User:Addshore/Git
Show the commits that are in your current branch, but not origin -- i.e., whether you're ahead of origin and by which commits.
git rev-list origin..HEAD
Show the commits that are in your origin, but not current branch-- i.e., whether you're behind of origin and by which commits.
git rev-list HEAD..origin
Show information about a specific commit
git show 36b314c
Reset to a previous commit.
git reset --hard hash/master
Rebase and merge:
git rebase master
git mergetool
git rebase --continue
Commit all changed files:
git commit -a
Amend the previous commit with all changed files:
git commit -a --amend
To commit push to gerrit review:
git push origin HEAD:refs/publish/master
git push origin HEAD:refs/drafts/master
Delete a git tag (and do it on remote)
git tag -d 12345
git push origin :refs/tags/12345