FreeKB - Git Branch and merge using Git Gui
Git - Branch and merge using Git Gui

Branches can be used to create separate containers for certain files. For example, let's say the master branch is the production ready files, and each child branch are staging files. In this example, staging files can be put in MyBranch, and the MyBranch can be merge into the master branch when the staging files are ready for production.


Select Branch > Create to create a new branch. In this example, a new branch named MyBranch is created. Then select Branch > Checkout to use a branch.


Let's create a new file named branch.txt in MyBranch. Stage and commit branch.txt. There is now a file named branch.txt at C:\Users\john.doe\Sample.


Select Branch > Checkout to return to the master branch. Branch.txt is no longer listed at C:\Users\john.doe\Sample.


While in the destination brach, select Merge > Local Merge to merge files from another branch into the destination branch. In this example, we want to merge MyBranch into master. Ensure you are in the master branch.


Now, branch.txt is in the master branch.

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 60f90 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |