From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: A simple git workflow for the rest of us Date: Sat, 15 Nov 2014 17:09:59 +0100 Organization: Programmerer Ingebrigtsen Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416067853 12021 80.91.229.3 (15 Nov 2014 16:10:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 16:10:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 15 17:10:48 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 1Xpfvz-0002fn-PH for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 17:10:47 +0100 Original-Received: from localhost ([::1]:40962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xpfvz-0001nK-9H for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 11:10:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpfvX-0001mI-VZ for emacs-devel@gnu.org; Sat, 15 Nov 2014 11:10:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpfvN-00068i-BS for emacs-devel@gnu.org; Sat, 15 Nov 2014 11:10:19 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:52809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpfvN-00068Y-5A for emacs-devel@gnu.org; Sat, 15 Nov 2014 11:10:09 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XpfvM-0000nO-96 for emacs-devel@gnu.org; Sat, 15 Nov 2014 17:10:08 +0100 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Nov 2014 17:10:08 +0100 Original-Received: from larsi by cm-84.215.51.58.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Nov 2014 17:10:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 89 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.51.58.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUAAAAAAAMFBQ0BAwkA AAS6fXwICA8AAQY2Eh8AAQcETrc+AAACLElEQVQ4jW2TQaucMBDHtS286wrC0muWyuuxpuySWy2B 4AcQPG9pcG/dViq5FpTc80Dm23YmE2UfvCAK+fn/z0wyk2VxHQqtx6J0YSwO+VEGKbNDBLnW5t44 UOpeFK0iwKsw07ROgBtrOQEqTgmUZpwAVwBoDEi1W5VmcmFFKwDtULeBvCxNCy8QCIB8BSYHawTw CLK8+W5p3eB8sp/JK/sWy8ibT7PvfbeA1h9lCLJmgGXg79equsJLcwRMqo5WT7Xd1lWcRgJc4O8q bQ8LvkTMN4I6gcFHUUyYQRJ470liHCQgNgETtqLgu1PXdf1iHYRHIOzz3NFajKN0dythh7jf9SOG EAxIIgQLuu4GW3COkQQIMKvTG6C/QXiV7gNQtXgD+EvYgierFNyTk411kGKwlkFvEdR2L3D2SwRU uSTQICCjrvd+ToAVB1aQ+bxbYYyGwbCDbsE7r7fgHg8We6FnIOXZxnTPP8mCIH0IVDZ2yV/O3/P7 HysKBO9m3pq7GXU/GLxPnTgNlDS1NV1sCk4DovH32TuAF8fgnh94cmIr0By0j4q8OPoEFDBo0uSU LajJKYlTFR4VZenU2rT7eFQ7wJNbtYtjGCL48yWCo8O51DjIrKmr7Cun+zRNsDYmqJUEtRAbKPUR VoxzWUmBXZ7dN2CwN5TCdFsVwaZAF+XwJpSKV26zXww0HoQasQ4sPdTYs5wsPkZCi+nWynH07RA/ OLhcsAwJ1AqY1X/rL0NxGDWE/wAAAABJRU5ErkJggg== Mail-Copies-To: never X-Now-Playing: Joni Mitchell's _Shadows And Light (1)_: "Amelia" User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:mnMsq8bMsNwCFjSbwlkHigD+9BI= 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:177193 Archived-At: I have committed the text below to admin/notes. I expect all git experts to be all horrified and stuff, but if you don't care about git kremlinology, but just want to fix bugs and stuff in Emacs, I don't think you really need to know. Feel free to fix the recipes in admin/notes. But please refrain from using the words "ref", "staging", "stash" or "local". -------------- (This is a draft. The method here won't actually work yet, because neither git-new-workdir nor merge-changelog are in the Emacs distribution yet.) Setting up and using git for normal, simple bugfixing ===================================================== If you haven't configured git before you should first do: git config --global user.name "Frank Chu" git config --global user.email "fchu@example.com" Initial setup ============= Then we want to clone the repository. We normally want to have both the current trunk and the emacs-24 branch. mkdir ~/emacs cd ~/emacs git clone @git.sv.gnu.org:/srv/git/emacs.git mv emacs trunk ./trunk/admin/git-new-workdir trunk emacs-24 cd emacs-24 git checkout emacs-24 You now have both branches conveniently accessible, and you can do "git pull" in them once in a while to keep updated. Fixing bugs =========== 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 which will update your repository, and then re-apply your changes on top of that. Then say git push Backporting to emacs-24 ======================= If you have applied a fix to the trunk, but then decide that it should be applied to the emacs-24 branch, too, then cd ~/emacs/trunk git log and find the commit you're looking for. Then find the commit ID, which will look like commit 958b768a6534ae6e77a8547a56fc31b46b63710b cd ~/emacs/emacs-24 git cherry-pick 958b768a6534ae6e77a8547a56fc31b46b63710b git commit --amend and add "Backport:" to the commit string. Then git push Merging emacs-24 to trunk ========================= This has yet to be written. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no