forked from firstcontributions/first-contributions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request firstcontributions#13719 from srishtiBajpai/newBranch
WHY USING BRANCHES DURING CONTRIBUTING
- Loading branch information
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
additional-material/git_workflow_scenarios/why-using-branches.MD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |