emacs-devel
[Top][All Lists]
Advanced

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

Re: Rewriting bzrmerge.el


From: Steinar Bang
Subject: Re: Rewriting bzrmerge.el
Date: Sun, 23 Nov 2014 17:32:57 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (windows-nt)

>>>>> David Engster <address@hidden>:

> It will always be able to merge origin/emacs-24. I guess you could set
> things up to merge from a second, separate clone (by adding it as a
> remote), but I don't see the need.

You don't need a clone for this, just a local bare repo.

I'm assuming that the two separate clones are %USERPROFILE%\emacs\master
and %USERPROFILE%\emacs\master for the examples above.

Open a magit bash window, and do this:
 mkdir -p $HOME/repositories/local/
 (cd $HOME/repositories/local; rm -rf emacs.git; git init --bare emacs.git)
 cd $HOME/emacs/master
 git remote add local $HOME/repositories/local/emacs.git
 cd $HOME/emacs/emacs-24
 git remote add local $HOME/repositories/local/emacs.git

And now you're ready to go.

If you have added a change to emacs-24 and want it on master, then do
this (in magit bash):
 cd $HOME/emacs/emacs-24
 git push local HEAD
 cd $HOME/emacs/master
 git fetch local
 git merge local/emacs-24

(if you were using a feature branch instead of emacs-24, you could just
push it instead of "emacs-24" that was used in the example).

To speed things up and keep the local repo small, you can do this:
 (cd $HOME/repositories/outgoing/emacs.git; git gc --prune=now --aggressive)

If you have lots of clutter in the local repo (eg. lots of defunct
feature branches), you can just do this and start fresh:
 (cd $HOME/repositories/local; rm -rf emacs.git; git init --bare emacs.git)

One reason for using magit bash instead of using git from regular
cmd.exe (which I also sometimes do), is that magit bash does TAB expand
on tags and branch names.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]