Some useful git commands

I’ve been using github and git for over 5 years now. And I STILL forget half of the time.

I’m just writing them here for reference.

This here is for keeping up your master up to date.

git checkout master
git reset upstream/master --hard

then when checking out

git checkout master
git pull
git checkout -b mybranch --track master

will keep things clean

Leave a Reply