KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I get stumped when git diff other_branch shows differences and git merge other_branch does nothing. What's the right way to incorporate that "missing" code into my_branch ? This SO answer diagramed a situation similar to mine. o---A---B---C-------G my_branch \ \ / --*D*---E---F other_branch Surprisingly changes in D aren't automatically merged into my_branch when I do git checkout my_branch git merge other_branch to bring in F to G Of course I can manually create a patch and apply it to my_branch , like this: git diff other_branch my_branch > patchfile git checkout my_branch patch -p1 < patchfile But I want to do this right, without mucking up the git log. With the patch approach, git will record the changes in D and my latest patch as happening independently of each other (code churn). I want to simplify the git log and make sure others don't have unintended things happen (quietly and insidiously) when they do a git merge my_branch .
Tags (comma-separated)
Save Edits
Cancel