Re: How to commit changes if remote repository changed directory structure?

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

 



On Thu, Mar 19, 2009 at 06:17:15PM -0700, andholt wrote:

> I have a lot of local changes to add, commit, and push. Right now our
> directory structure is 1/2/3. Another developer decided to move everything
> up one level, so used git move to move 3 to 2, and removed 3, so now the
> level is 1/2. However, locally, all of my changes are in 1/2/3. 
> 
> I want to commit my changes and merge them into the new directory structure.
> How would I go about doing that?

First, commit your changes. Then merge the other developer's changes. :)

This is exactly the sort of case that git's rename detection should
handle; it should detect that the other side renamed files, and then
consider your changes against the newly named files. The only thing it
_won't_ handle is new files that you added in 1/2/3. You will have to
manually move them to 1/2 as part of the merge (there has been
discussion of "detect that this whole directory seems to have had its
content moved and automatically move new files", but the patches have
not been accepted).

-Peff
--
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