Wednesday, October 29, 2014

GIT : Branching


Git Branching is the basic need in Git Version control.

Here i like to share the steps to manage the branch in your application repository.

Step 1: I am assuming initially you have "master" branch in your application then you create another branch i.e. "development" then run the below command:

# git branch development

# git checkout development  

//it will switch the branch into "development" branch

Step 2: Now your are in fresh "development" branch. Then push your "master" branch code into the "development" branch.

# git push origin development

GIT clone form specific branch

# git clone <git-repo-url> -b <branch-name> --single-branch

Suppose i had to take git clone of specific branch like development-fix not all others then my command would be

# git clone -b development-fix --single-branch


No comments :