Merge

hii , ive a question about how to merge. 

for example i ve two branch in a Repo: master and develop.  i am in  the  develop branch, and want to merge the master branch in the develop one.

normaly i ve to switch to the master branch , make a pull(from origin) and switch back the the develop branch and merge the master.  My question is , ist there a way to stay in the develop branch , make a pull , that will update the master, and then merge the master branch.

 hope u guys catch what , i mean :slight_smile:

There is a way to do what you want from the develop branch, yes:

git fetch
git merge origin/master

The git fetch command will retrieve the latest set of commits from the default remote, typically origin. Since your local copy of master is unchanged by the fetch command, you have to specify that you want to merge origins version of master by issuing git merge origin/master.

I hope that helps!

1 Like