Re: merge renamed files/directories?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avery Pennarun <apenwarr@xxxxxxxxx> wrote:
> 
> I have a branch called 'mylib' with my library project in its root
> directory.  What I wanted was to maintain my library in the 'mylib'
> branch, then merge my library into the "libs/mylib" directory of my
> application, which is in the 'myapp' branch. [...]
> 
> This actually works like magic in git - except when you create a file
> in the 'mylib' branch, in which case it gets merged to the wrong path
> every single time.  It seems to me like it should be very easy to put
> it in the right place instead, making one more interesting use case
> possible.
> 
> I realize git-submodule is the way you're supposed to do something
> like this, but git-submodule doesn't really do what I want (yet) for
> reasons discussed in other threads.

`git pull -s subtree mylib` ?

This is how git-gui and gitk are merged into git.git, and it avoids
this case by looking for a subdirectory rename, more specifically
a rename of "/" to "mylib/".

It also can go the other way, that is rename "mylib/" to "/", but
this path is never used as far as I know as git-gui and gitk don't
ever merge in the git.git history.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux