Created
March 30, 2012 22:16
-
-
Save jgdavey/2256047 to your computer and use it in GitHub Desktop.
Git alias to add untracked files
This file contains 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
[alias] | |
add-untracked = !"git status --porcelain | awk '/\\?\\?/{ print $2 }' | xargs git add" |
This is actually the opposite of git add --all.
It does add the untracked and the tracked - I agree it does more than just the untracked. So yeah, if your intent is untracked only --all doesn't work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's wrong with
git add --all
I have an alias aa