4 ms·
I maintain a bunch of git aliases in my .gitconfig for my company's rebase based workflow. They cover 90% of my 'dumb' git usages synced = pull origin mast
by softwaredoug 5y ago
I maintain a bunch of git aliases in my .gitconfig for my company's rebase based workflow. They cover 90% of my 'dumb' git usages
synced = pull origin master --rebase. # Update myself with master
squash = rebase -i origin/master # Let me optionally squash whatever has happened since master
publish = push origin HEAD --force-with-lease # Save to orig in (github)
pub = push origin HEAD --force-with-lease # Save to origin (github)
ammend = commit --amend # I cannot spell this word for the life of me
amend = commit --amend
- dstroot 5y agoI use Oh My ZSH git aliases. Examples: gcmsg "git commit -m" - Git commit message gco "git checkout" - Change branch gd "git diff" - Files differences in staging gl "git pull" - Pull from remote gp "git push" - Push to remote --- Tool looks interesting!
- agilob 5y agoohmyzsh has git plugin and a few other git-related plugins with these aliases already available https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/README.md https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/R...
- agilob 5y agoIf you use zsh and ohmyzsh you have these commands available in `git` plugin with full docs here https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/README.md https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/R... A must read for every cli git user.
- epage 5y agoI used to use aliases but got frustrated with them when dealing with PRs depending on PRs, so I wrote git-stack [0]. Thought I'd share in case you'd find it useful [0] https://github.com/epage/git-stack/blob/main/docs/reference.md#git-stack https://github.com/epage/git-stack/blob/main/docs/reference....
- julius_deane 5y agoconsider: [pull] rebase = true # if you're going to do it anyway might as well make it the default [rebase] autoSquash = true # if you use --fixup commits autoStash = true # save yourself the roundtrip
- agentwiggles 5y ago> ammend = commit --amend # I cannot spell this word for the life of me This reminds me of one of my favorite silly aliases, which requires declarations in both my shell profile and my .gitconfig: In .bashrc : `alias gits=git` In .gitconfig : `[alias]` `tatus = status` This allows me to mistype `git status` as `gits tatus` and brings me a small amount of joy.