20,290
edits
mNo edit summary |
mNo edit summary |
||
Line 38: | Line 38: | ||
== 2) Create a Branch == | == 2) Create a Branch == | ||
Branches are used to develop features isolated from each other. The master branch is the "default" branch when you create a repository. <br>Use other branches for development and merge them back to the master branch upon completion. | Branches are used to develop features isolated from each other. The master branch is the "default" branch when you create a repository. <br>Use other branches for development and merge them back to the master branch upon completion. | ||
Create a new branch named tatasdk1 and switch to it using below command: | Create a new branch named tatasdk1 and switch to it using below command: | ||
<pre>git checkout -b tatasdk1 | <pre>git checkout -b tatasdk1 | ||
</pre> | </pre> | ||
Switch back to master | Switch back to master by running the below command: | ||
<pre>git checkout | <pre>git checkout master | ||
</pre> | </pre> | ||
And delete the branch again: | And delete the branch again: | ||
<pre>git branch -d tatasdk1 | <pre>git branch -d tatasdk1 | ||
</pre> | </pre> | ||
A Branch is not available to the others unless you push the branch to your remote repository | A Branch is not available to the others unless you push the branch to your remote repository | ||
<pre>git push origin tatasdk1 | <pre>git push origin tatasdk1 | ||
</pre> | </pre> | ||
'<br> | '<br> |