Reference: Git

Challenge: sticky post for Git!

Tagging

git tag -a v1.4 -m "my version 1.4"

git show v1.4

git push origin v1.5 OR git push origin --tags

View Diff in Past Commits

git show -commit #-

Create & push repo locally to remote

git init

git commit -m "msg"

git remote add origin https://github.com/git_user/repo_name.git

git push -u origin master

Update author of commits

git author

What remotes do I have?

git remote -v

Grab all branches from remote

git fetch --all

Reset the index and working tree

git reset --hard *branch*

Redo commit message (prior to push to remote)

git commit --amend -m “new msg"

View # of commits and author

git shortlog -sn

Grab remote branch and force overwrite locally

http://stackoverflow.com/questions/1125968/force-git-to-overwrite-local-files-on-pull