Version Control with Git Flow

#48 Version Control with Git Flow
9/25/2016

Summary

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.
2
version control git

Summary

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

672989?v=3&s=64
sadiqmmm said 4 months 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.

00000000000000000000000000000000?d=mm&f=y&s=64
frank004 said 3 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. 

635114?v=3&s=64
kobaltz said 3 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