Re: Files different for me

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

 




On Wed, 25 Feb 2009, John Dlugosz wrote:
>
> I'm working with a group, and using git for source code.  I need to 
> change a couple files temporarily and just for me.  I thought, "that's 
> easy", just don't stage them when I check in changes.  But, what do I do 
> when I pull changes from others?  I think it will complain that I have 
> unsaved changes.

If your changes do not touch any of the files that the "git pull" updates, 
then everything is fine. The pull will just work, and your changes will 
still exists in your tree. This is not an accident - git was very much 
designed to work that way, because it's a common usage case for me.

I often have some trivial small changes in my tree (like a pending change 
to the top-level Makefile for the next version number that I just haven't 
committed yet - just a reminder to myself that I'm soon about to release 
another -rc). And I still want to continue to do "git pull" to fetch 
stuff, or even "git am -s" to apply patches.

HOWEVER. If the pull actually wants to modify a file that you have changed 
(ie that same file was changed in the remote), then "git pull" will fail 
gracefully after having done the fetch, saying something like

	Entry 'file-name' not uptodate. Cannot merge.

and at that point you have to decide whethe you want to commit the change, 
"stash" it, or just undo it. Or whether you don't want to do the merge 
yet because you're still working on your own changes, and don't want the 
distraction.

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