Jump to content

Typical Git workflow: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 30: Line 30:
OR
OR


git clone $REPO.git tatasdk</pre>
git clone $REPO.git tatasdk</pre>  
'''Creating the Working copy of the local repository by running the command:'''  
'''Creating the Working copy of the local repository by running the command:'''  
<pre>git clone path/to/repository</pre>
<pre>git clone path/to/repository</pre>  
<br>
== 2) Create a Branch  ==


<br>  
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:
<pre>git checkout -b tatasdk1
</pre>
Switch back to master (tatasdk) by running the below command:
<pre>git checkout tatasdk
</pre>
And delete the brach again:
<pre>git branch -d tatasdk1
</pre>
A Branch is not available to the others unless you push the branch to your remote repository
<pre>git push origin tatasdk1
</pre>
'<br>
'<br>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.