Skip to content

Instantly share code, notes, and snippets.

@mwwhited
Last active December 4, 2020 16:18
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 mwwhited/b80904be3940718e4b0521f76760d16d to your computer and use it in GitHub Desktop.
Save mwwhited/b80904be3940718e4b0521f76760d16d to your computer and use it in GitHub Desktop.
git tips

Git Notes

Summary

I can't remember all this voodoo so maybe this will help.

Commands

force accept remote changes

git checkout --theirs . && git add .

delete remote tag

git push origin :tagname

Commit count (current)

git rev-list --all --count

Commit count (head)

git rev-list HEAD --count

Current Branch Name

git branch --show-current

Commits per user

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