DEV Community

Discussion on: Using Aliases to Speed Up Your Git Workflow

 
codeandclay profile image
Oliver

I don't have many aliases for git commands but seeing git add -A has inspired me to add one more to my small list:

alias gip='git add ${FILE} -p'

As in: git add file.rb -p. The -p flag tells git that you want to select which individual lines/hunks get committed. It's the scalpel to -A's mallet.

The alias allows me to do it this way: gip file.rb

Thread Thread
 
jbristow profile image
Jon Bristow

SInce i work in feature branches that get squash merged in a few days, I don’t really understand why you would be doing more than one thing at once...

Thread Thread
 
jessekphillips profile image
Jesse Phillips

I don't think squash merge should exist. The commit message sucks, many times your feature can be good individual changes (valuable outside the feature) it is pretty easy to finalize the order and squash with a rebase --interactive.

I'm said --fixup isn't listed as as alias.