Advertisement

Monday, November 18, 2019

DevOps: GIT : Breaking Down the GIT PUSH - Meaning and Details

Well 'git push' is one of the widely used commands by developers, In this blog I am going to break down what it means. 

In very simple terms.


So a normal syntax of command is like this

$ git push origin master
OR
$ git push <remote> <branch_name>

Here 
origin means : The remote repository which is tracked as origin.  You can get these details by running git remote -v.

branch_name: Means the local branch which you want to push to origin. So, if you give master it is your local master branch or if it is not master then the name which you gave. 

Another alternate to this is using HEAD
git push origin HEAD pushes the current branch which you are working on and is checked out by you.

So, that's it. If you have any questions feel free to ask. 


No comments:
Write comments