Scott Watermasysk

Still Learning to Code

Setting Up Git-Flow on a Remote Repository

I am using the great git-flow plugin which forces you through an ideal work flow with git (see this post if this makes no sense).

One of the things I wanted to make sure is that my develop branch is properly available for multiple machines and users.

Before you start, you will need to grab git-flow. OS X users can cheat and use the homebrew (brew install git-flow)

Quick steps (assumes a remote exists with both master and develop branches).

git clone remote_reporistory_path
git checkout -b develop origin/develop
git flow init

Now if you have already cloned the repository and setup gitflow, you can enable remote tracking with:

git checkout develop
git branch --set-upstream origin/develop

That’s it. Now you (and others) can properly access and share the develop branch. You can follow the same steps to setup a release/hotfix/etc branches.