Git flow steps for a new project

I use in all my projects, and it makes my life worth living.

However, whenever I start a new project I can never seem to remember the initial steps that needs to be taken to create the remote develop branch, which include tracking the branch locally.

So for my own sanity, here is what you need to do when starting a new git-flow repo…

Step 1:

Create your repo on github. This will create the default master branch only.

Step 2:

In you shiny new repo, create the develop branch locally.

git flow init

Step 3:

Create the remote develop branch.

git push origin develop

Step 4:

Track the remote develop branch.

git branch --set-upstream develop origin/develop

Done.

Now write some code.

When checking out an existing repo, you only need Step 4 in order to track the remote develop branch.

Now write some code.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s