Skip to content

Commit

Permalink
Merge pull request firstcontributions#13719 from srishtiBajpai/newBranch
Browse files Browse the repository at this point in the history
WHY USING BRANCHES DURING CONTRIBUTING
  • Loading branch information
sara-02 authored Jan 18, 2019
2 parents 25878e9 + bdf3bc4 commit d165e3f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions additional-material/git_workflow_scenarios/why-using-branches.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# WHY USING BRANCHES DURING CONTRIBUTING

Branches are simply pointers to a commit.

When you branch out, git is essentially making a new state of your current code, upon which you can work, without affecting the important main state of the code (which is in master branch).

When your happy with your experiments, and want to merge you experiments in main code, you run git merge
<branch name> master.
This will tell git, to add in all changes from your experiment branch into master.

This way, while working in a open source project with a number of contributers, it becomes easy to merge the best suited code without altering the main code or master branch.

0 comments on commit d165e3f

Please sign in to comment.