Question

I'm following the subtree walk-through from here.

I'm at the point where I want to merge local changes I've made in my subtree upstream to the original repository, but the walk-through doesn't specify what command should be run.

To merge into my local branch, I can use:

$ git checkout master
$ git merge --squash -s subtree --no-commit rack_branch

What is the command to merge into rack_branch from master (assuming the subtree directory is Rack/)?

From the documentation:

All the changes from your Rack project are merged in and ready to be committed locally. You can also do the opposite — make changes in the rack subdirectory of your master branch and then merge them into your rack_branch branch later to submit them to the maintainers or push them upstream.

But it doesn't give you any guidance on the actual command.

Was it helpful?

Solution

I hate answering my own question, but in case someone stumbles here this might help out.

The first article I referenced (part of the git-scm book), is out of date. The best method to do this is to use the git subtree command.

This article explains it it detail. The process is much simpler than using git merge subtree.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top