[Top][All Lists]

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

Re: A simple git workflow for the rest of us

From: Achim Gratz
Subject: Re: A simple git workflow for the rest of us
Date: Sat, 15 Nov 2014 18:39:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.51 (gnu/linux)

Lars Magne Ingebrigtsen writes:
> Then we want to clone the repository.  We normally want to have both
> the current trunk and the emacs-24 branch.

Trunk is now known as master.

> git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git

Better to do the clone either with git: or http: public access and leave
the ssh credentials strictly for pushing to upstream.  You do this by
adding a section like this to your global git config (you could add it
to the repo config, but that doesn#t make much sense if you're having
multiple clones around):

[url "git+ssh://<membername>@git.sv.gnu.org/srv/git/emacs.git"]
        pushInsteadOf = git://git.sv.gnu.org/emacs.git

That should help the server load a bit.

> mv emacs trunk

If you're going to rename the directory, you'd be better off just
telling git clone what you want it to be named:

git clone -b master git://git.sv.gnu.org/emacs.git master

> ./trunk/admin/git-new-workdir

This doesn't exist and whether or not git-workdir or even separate
working trees is what you'll want is debatable.  Personally I just
switch branches and build out-of-tree, but for something as large as
Emac I can see the utility of having separate workdirs.  If the
directories are side-by side anyway, then

git clone -b emacs-24 --reference emacs git://git.sv.gnu.org/emacs.git emacs-24

is just as good.

> You edit the files in either branch, `M-x vc-dir', and check in your
> changes.  Then you need to push the data to the main repository.  This
> will usually fail, since somebody else has pushed other changes in the
> meantime.  To fix this, say
> git pull --rebase

When working with upstream this is good practrice, but if you're going
to do that anyway, just configure your branch with "rebase = true".  Or
configure "autosetuprebase = true" on a repo-wide or global basis so Git
will do that by default (you can always change that later of course).

> cd ~/emacs/emacs-24
> git cherry-pick 958b768a6534ae6e77a8547a56fc31b46b63710b
> git commit --amend

Oh please, use the --edit / -e option and save yourself the trouble of
having to amend.

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:

reply via email to

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