Skip to content

Instantly share code, notes, and snippets.

@yasu47b
Last active July 20, 2016 01:30
Show Gist options
  • Save yasu47b/c423f8e4810c2f5b742f to your computer and use it in GitHub Desktop.
Save yasu47b/c423f8e4810c2f5b742f to your computer and use it in GitHub Desktop.

my git quick reference

remove remote branch

git push <remote name> :<remote branch name>
git push origin :hoge

show differences

show differences between two commits

git diff <sha1 hash> <sha1 hash>

undo commands

unstage all staged changes

git reset

undo latest commit

this command deletes edit files.

git reset --hard HEAD^

remain changes

git rest HEAD^

merge

cancel

git reset --merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment