X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Message-ID: <20150318184822.2124.qmail@stuge.se> Date: Wed, 18 Mar 2015 19:48:22 +0100 From: Peter Stuge To: geda-user AT delorie DOT com Subject: Re: [geda-user] pcb alternatives Mail-Followup-To: geda-user AT delorie DOT com References: <201503181619 DOT t2IGJkZD012945 AT envy DOT delorie DOT com> <20150318165331 DOT 25228 DOT qmail AT stuge DOT se> <201503181709 DOT t2IH9StK014643 AT envy DOT delorie DOT com> <20150318174247 DOT 29231 DOT qmail AT stuge DOT se> <201503181744 DOT t2IHi8Im015958 AT envy DOT delorie DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503181744.t2IHi8Im015958@envy.delorie.com> Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk DJ Delorie wrote: > > What do you want? > > I want "git update" to do what "cvs update" and "svn update" does - > update the source tree under my work-in-progress. I think this: git config --global alias.update \ '!git stash -a && git pull --rebase && git stash pop --index' might do what you want. The only gotcha is that if your WIP stash conflicts with what you've pulled, the stash will not get dropped. You can just leave it sitting there, it doesn't matter too much. If you don't mind losing track of what was git add:ed then another idea is: git config --global alias.update \ '!f=$(mktemp) && git diff HEAD > "$f" && git reset --hard && \ git pull --rebase && git apply "$f" && rm "$f"' although much more clumsy, it could also do the trick. This complexity is only needed if creating a few temporary commits must always be avoided at all cost. It would be much simpler to create temporary commits with the WIP and turn them into a single proper commit in the end, when the work is finished. Then: git config --global alias.update 'pull --rebase' //Peter