Created
February 8, 2017 17:59
-
-
Save fernandotakai/f38cc0761c4f3df0edc8a4138df8eca9 to your computer and use it in GitHub Desktop.
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
| function git-add(){ | |
| git add $(git status -s | egrep '^(\s|\?\?).*?$' | fzf -m | cut -c4-) | |
| git commit -v | |
| } | |
| function git-remove(){ | |
| git reset HEAD -- $(git status -s | egrep -v '^(\s|\?\?).*?$' | fzf -m | cut -c4-) | |
| } | |
| function git-checkout(){ | |
| git checkout -- $(git status -s | egrep '^(\s|\?\?).*?$' | fzf -m | cut -c4-) | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
those are three simple functions that help be stage/remove/reset files using git. i feel like it's easier than typing whole paths, even with autocomplete.
usage: https://asciinema.org/a/djfmtdl34r4niqp6d0kd8zbgi