Created
November 15, 2012 14:57
-
-
Save jjthrash/4079031 to your computer and use it in GitHub Desktop.
Editing new files as you stage them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Why? You might want to remove log files, commented code.. generally clean up your | |
| # code before you stage it. You might also want to remove function that isn't ready | |
| # yet in order to keep your commits concise and meaningful. | |
| # stage an empty version of the file so we can git add --patch later | |
| git add -N thefile | |
| # add --patch, so we can tweak the file (via the edit hunk feature) before it's | |
| # staged | |
| git add --patch thefile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment