Skip to content

Instantly share code, notes, and snippets.

@teitei-tk
Created October 17, 2014 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teitei-tk/db13d88fc06b784340b8 to your computer and use it in GitHub Desktop.
Save teitei-tk/db13d88fc06b784340b8 to your computer and use it in GitHub Desktop.
俺俺Gitのalias&ワンライナー集 ref: http://qiita.com/teitei_tk/items/699cef25a14db67ba8b7
[alias]
restart = reset --hard HEAD
$ git restart
[alias]
delete-items = !git status | grep deleted: | awk '{print $2}' | xargs git rm
$ touch README.md
$ git commit -a -m "first commit"
$ rm README.md
$ git delete-items
$ git commit -a -m "remove : README.md"
[alias]
delete-add-items = !git status | awk '{print $1}' | xargs rm -rf
$ git branch | grep hoge | xargs -I % git branch -D %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment