Note that there are some explanatory texts on larger screens.

plurals
  1. POGitHub - merging changes to a branch in different folder from master
    text
    copied!<p>I have been using github for quite a while. Now I have multiple branches for a project and also working on a couple of branches at the same time. For every branch I have a folder dedicated to itself and I commit and do a push to respective branches. Now I have a situation where I have to update one of my branches with changes in the master, since I branched before making the changes to the master. Before I do any commit, I created a 'playground' repo and was playing with it. This is the method I follow to merge the changes from my master to the branch and I would like to get all of your opinions on this method - whether it's correct or not and also whether something else has to be done. Of course, I figured out this method using SO, but the answers were in bits and pieces across multiple questions. But just wanted a single point where I could verify what I am doing!</p> <p>As a side note, while I was looking up for information, I saw that I don't have to create separate folders for the branches and can just use 1 folder. But I like this approach better - maintaining separate folders. </p> <p>Here is what I do:</p> <pre><code># make some changes to master and commit it git add . git commit -m 'at last!' git push -u origin master # cd to the branch git pull git merge origin/master # now commit to branch git add . git commit -m 'updates from master' git push -u origin playground-0.1 </code></pre> <p>Can you please let me know whether I am following the correct approach? Thanks a lot!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload