User Tools

Site Tools


changing_merging_git_branches

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

changing_merging_git_branches [2016/09/02 11:09] (current)
jongsok.choi created
Line 1: Line 1:
 +====== Changing Git Branches ======
 +
 +Changing git branches is simple. For example, if you were on the **streaming_support** branch, and want to change to **master**, simple do:
 +<​code>​
 +git checkout master
 +</​code>​
 +
 +If you have changed any files that are tracked by git, git will complain and show what those files are. Commit and push those files, then try checking out master again. ​
 +
 +====== Merging Git Branches ======
 +
 +Once you are on the **master** branch, and want to merge the **streaming_support** branch into the **master** branch, do:
 +<​code>​
 +git merge streaming_support
 +</​code>​
 +
 +In the best case, there are no conflicts and all files are merged automatically. Commit, push, then you are done. If it has been a while since the second branch was created, or since the last merge, then most likely there will be conflicts. Git will show which files have conflicts. You need to go into those files and merge them manually (search for %%<<<<​%% in the file). After merging, commit and push. 
 +
  
changing_merging_git_branches.txt ยท Last modified: 2016/09/02 11:09 by jongsok.choi