Git – Code submission to Master from branch

Objective : I am working on my local branch, I want to push ( submit or check in) my code changes into the remote master (main branch)

Solution 1:
git checkout master git pull #to update the state to the latest remote master state git merge develop #to bring chnages to local master from your develop branch (resolve conflicts if any) git push origin master #push current HEAD to remote master branch
Solution 2:
git pull remote origin/master # to take latest from master to you branch (resolve conflicts if any)
git push remote origin/master # to submit code to remote master

git push remote origin/branch # to submit code to remote branch

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s