#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


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
nano README.md
git status
git add README.md
git commit -m 'Removed text'
git flow feature finish

Command Overview

Taken from linked Git Flow Cheatsheet

sadiqmmm said over 3 years ago on Version Control with Git Flow :

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 over 3 years ago on Version Control with Git Flow :

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 PRO said over 3 years ago on Version Control with Git Flow :

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