views:

63

answers:

1

I'm using git-svn to work with a codebase and I need to merge changes in trunk to my branch.

I have both branches fetched in git, and when I run git diff trunk while in my branch, I can see all the changes.

When I run git merge heads/trunk, however, I get a message "Already up-to-date".

It's clearly not up to date. What am I doing wrong?

+1  A: 

"Already up-to-date" can mean:

  • trunk is a parent of master (all the changes from trunk have already been merged to master)
  • or you are working on a detached head (which can happen if you checkout directly a SHA1 commit reference, or a tag).

Note: be aware of git svn caveats

Merge tracking in Subversion is lacking and doing branched development with Subversion can be cumbersome as a result.
While git svn can track copy history (including branches and tags) for repositories adopting a standard layout, it cannot yet represent merge history that happened inside git back upstream to SVN users.
Therefore it is advised that users keep history as linear as possible inside git to ease compatibility with SVN

For the sake of simplicity and interoperating with a less-capable system (SVN), it is recommended that all git svn users clone, fetch and dcommit directly from the SVN server, and avoid all git clone/pull/merge/push operations between git repositories and branches.
The recommended method of exchanging code between git branches and users is git format-patch and git am, or just 'dcommit'ing to the SVN repository.

VonC
Aha... so I'm using too much of git functionality than pulling from svn really allows me to. Good to know, thanks!
Josiah Kiehl