Version Control with Git Flow

#48 Version Control with Git Flow


Using Git Flow, learn how to work with branches and organize your changes. Once you have completed features, learn how to merge them back into a develop branch and prepare for a release to your master branch.
version control git 6:33 min


Terminalbrew install git
brew install git-flow-avh

rails new testapp
cd testapp
git init
git flow init

git status
git branch
git add -A .
git commit -m 'first commit'

git flow feature start update-readme
git status
git add
git commit -m 'Removed text'
git flow feature finish

Command Overview

Taken from linked Git Flow Cheatsheet

sadiqmmm said about 1 year ago:

Hi Dave, amazing screencast on Git flow. Thank you for creating such an informative screen cast on git flow. Looking forward for more videos on git and rubyonrails.

frank004 said 12 months ago:

as a single developer, I like to learn more f how to do feat. or hotfix and know what is what. If you can make a video on that will be very nice. 

kobaltz said 12 months ago:

When you do something like

git flow feature start FEATURENAME

It will create a branch called feature/FEATURENAME and it will be copied from the develop branch.

From here, you can make your code changes as needed and then make your git commits as you normally would.

If you are wanting to move your work over to another computer, you can call git flow feature publish and it will create the branch on the remote repository. You can then checkout the feature on the other computer.

When all changes and commits are made, you call 

git flow feature finish #optionally passing -m 'COMMIT MESSAGE'

and this will merge your commit back into the develop branch. Alternatively, you can publish your commit again to the remote repository and then create a merge request.

Login to Comment