Skip to content

Instantly share code, notes, and snippets.

@errzey
Last active December 21, 2015 01:27
Show Gist options
  • Select an option

  • Save errzey/0a5e0bfa399a57207c29 to your computer and use it in GitHub Desktop.

Select an option

Save errzey/0a5e0bfa399a57207c29 to your computer and use it in GitHub Desktop.

Using git-flow to make your development process awesome

The Workflow in Detail

Commandline Utility For the flow Model

=========================================

Fork the project into your own account

Simply go to the repository of choice and click fork, then setup your origin and upstream for tracking.

  1. git clone git@github.com:<username>/<project>.git
  2. cd <project>
  3. git remote add upstream git@github.com:<MainRepo>/<project>.git
  4. Right now, none of our upstream repositories have a develop branch. Once we do: git checkout -t upstream/develop. This will inform you of changes made to the upstream (main).
  5. git fetch --all --tags

Install git-flow

  1. git clone http://github.com/nvie/gitflow.git
  2. cd gitflow/
  3. git submodule init
  4. git submodule update
  5. sudo make install

Update your tree to be git flow compliant

  • git checkout develop
  • git flow init
    • This brings up a menu of various things you can configure. Using defaults is usually fine.

Doing stuff

Some basics

Features

  • git flow feature start <feature name>
  • This will create a branch feature/<feature name> based from develop and switch to it.
  • Do your feature modifications on this branch. PUSH OFTEN
  • Once you feel as if you're code is complete, run git flow finish <feature name>
    • This will automatically merge your changes back into develop, resolve conflicts if needed, and remove the feature branch locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment