Git Tricks I Keep Having to Look Up

Another trail of breadcrumbs for myself…me being the kind of guy I am, I try to do things the “git” way so I don’t piss off those upstream who might otherwise not have the energy to deal with another PR.

Sync Fork with Upstream
http://stackoverflow.com/questions/3903817/pull-new-updates-from-original-github-repository-into-forked-github-repository?rq=1

Git Squash
https://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one/

Reverting Git Commits
http://stackoverflow.com/questions/6971717/github-how-to-revert-changes-to-previous-state#6971775

Switching branches
http://stackoverflow.com/questions/1475037/switching-branches-in-git

Push.default warning
http://stackoverflow.com/questions/13148066/warning-push-default-is-unset-its-implicit-value-is-changing-in-git-2-0#13148313

The Git Workflow (according to Atlassian)
https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

Switching to SSH for an existing local repo
http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

The classic…
http://nvie.com/posts/a-successful-git-branching-model/

Advertisements