Git - Create new branche, push and merge

Submitted by editor on Wed, 01/06/2016 - 16:13
Question

How to create new branche, push and merge to make a correction ... ?

git checkout -b // TO TEST

git branch <branche>  // TO TEST

Create new branche from current branche
git checkout <branche>  
OR
git checkout -b <branche> (Example : function/VERSION_ID/BUG_TICKET_ID ((feature/1.6/123456))
Ex: git checkout -b release/1.0.2/123
Create new branche from ANOTHER branche (Ex: version/master)
git checkout -b <new_branche> <source>
Ex: git checkout -b release/1.0.2/123 origin/version/master

 

git add --all

git commit -m "The comment, Message, Correction ..."

git push origin the/new/brancge/BUGID
 

Create a new branch from remote branch other than HEAD (Ex origin/develop)
git checkout -b develop origin/develop

OR

git checkout release-v1
git pull origin release-v1

 

Git merge example

git checkout develop
git pull origin develop
git checkout master
git pull origin master
git merge develop
git push origin master

Put into production server

git checkout master
git pull origin master

Tags

Add new comment