From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.devel Subject: Re: A simple git workflow for the rest of us Date: Sat, 15 Nov 2014 18:39:03 +0100 Organization: Linux Private Site Message-ID: <87sihkicso.fsf@Rainer.invalid> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416073186 28027 80.91.229.3 (15 Nov 2014 17:39:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 17:39:46 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 15 18:39:39 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XphJy-000344-NZ for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 18:39:38 +0100 Original-Received: from localhost ([::1]:41413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XphJy-000171-C5 for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 12:39:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XphJf-00015i-QP for emacs-devel@gnu.org; Sat, 15 Nov 2014 12:39:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XphJa-0000nI-EM for emacs-devel@gnu.org; Sat, 15 Nov 2014 12:39:19 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:57696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XphJa-0000nE-7s for emacs-devel@gnu.org; Sat, 15 Nov 2014 12:39:14 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XphJZ-0001Nm-Ek for emacs-devel@gnu.org; Sat, 15 Nov 2014 18:39:13 +0100 Original-Received: from pd9eb2d17.dip0.t-ipconnect.de ([217.235.45.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Nov 2014 18:39:13 +0100 Original-Received: from Stromeko by pd9eb2d17.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Nov 2014 18:39:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 65 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pd9eb2d17.dip0.t-ipconnect.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.51 (gnu/linux) Cancel-Lock: sha1:pvYIFLZkdDqyVjRKygqyJX+hxRo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177211 Archived-At: 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 @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://@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. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds