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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s