Today in this blog I will let you know about the basics of Git(Branching).
First of all lets start with how to get someone’s repository. Suppose you have the access rights as a developer and you want to work on that project. In this case you have to get clone that repository with the following command.
git clone http://URLOFTHEREPOSITORY
Now if you have the access rights as developer so, you can’t make changes in the master branch then the solution is you have to create your own branch with the following command
git branch starter #It will create a new branch named as starter
git checkout starter # It will shift you from master to starter
Now made some changes which you want in your branch locally and then push those changes of branch to the remote repository with following command
git add . # to add all the files or you can even specify the files which you want to add for commit
git commit -m “Message” # to commit the changes which you have made”
git push origin starter # push those changes to the branch named as starter to remote repository.
Be the first to comment.