Last active
August 4, 2017 13:02
-
-
Save mauricioprado00/6888a2fb1aa9f2961ecdf4405f2f98aa to your computer and use it in GitHub Desktop.
New command for adding only modified files to stage
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
#!/bin/bash | |
# usage: | |
# git addmodified | |
git add $(git status --porcelain | awk '/^.M/{print $2}') | |
# New command for adding only modified files to stage | |
# save it with: | |
# sudo curl https://gist.githubusercontent.com/mauricioprado00/6888a2fb1aa9f2961ecdf4405f2f98aa/raw/git-addmodified > /usr/local/bin/git-addmodified | |
# chmod +x /usr/local/bin/git-addmodified |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment