Skip to content

Instantly share code, notes, and snippets.

@Duroktar
Last active August 3, 2017 07:00
Show Gist options
  • Save Duroktar/5a8a045397330e443d59c5d6d011affe to your computer and use it in GitHub Desktop.
Save Duroktar/5a8a045397330e443d59c5d6d011affe to your computer and use it in GitHub Desktop.
Auto Setup a Cloned Git-Flow Style Repository.

Disclaimer

I found this on https://coderwall.com/p/f4cnkg/a-better-way-to-setup-git-flow, and I want no illusions as to the source. I just know that I'll forget about it unless I put it on here.

Setup

Bash

  $ git config --global alias.flow-setup '!git branch --track develop origin/develop 2>/dev/null ; git flow init -fd && git checkout master && git pull origin master && git checkout develop && git pull origin develop'

Usage

Now clone and setup tracking for any git-flow style repo by running the following.

  $ git clone https://github.com/user/repo.git
  $ cd repo/
  $ git flow-setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment