Re: pull into dirty working tree

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

 



Hi,

On Wed, 13 Jun 2007, Andy Parkins wrote:

> On Wednesday 2007 June 13, Johannes Schindelin wrote:
> 
> > The other thing, if you have to, is to put all dirty changes into the
> > index before pull. Something like "git add $(git ls-files --modified)".
> 
> Or the shiny new
> 
>  git add -u
> 
> which works a treat :-)

Yeah, completely forgot about that.

Another idea just hit me: you could add this to your "[alias]" section:

	stash = !git add -u && \
		tree=$(git-write-tree) && \
		commit=$(echo stash $(date) | \
			git-commit-tree $tree -p HEAD) && \
		git-update-ref refs/heads/stash $commit && \
		git-reset --hard

	up = !git stash && git pull && git cherry-pick -n stash

Or something like that (untested!). Then, your users could use "git up" to 
pull from origin, and reapply their changes on top, without committing.

This assumes that your users only have the remote "origin", but given 
their obvious "objections" to Git concepts, I think they do.

Ciao,
Dscho

-
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