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: Re: A simple git workflow for the rest of us Date: Sun, 16 Nov 2014 15:13:40 +0100 Message-ID: References: <87y4rc9rhj.fsf@igel.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416147268 28208 80.91.229.3 (16 Nov 2014 14:14:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Nov 2014 14:14:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 16 15:14:23 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 1Xq0as-00083s-Az for ged-emacs-devel@m.gmane.org; Sun, 16 Nov 2014 15:14:22 +0100 Original-Received: from localhost ([::1]:43917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq0ar-0006jd-U4 for ged-emacs-devel@m.gmane.org; Sun, 16 Nov 2014 09:14:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq0ab-0006cy-4m for emacs-devel@gnu.org; Sun, 16 Nov 2014 09:14:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xq0aW-0007qc-4d for emacs-devel@gnu.org; Sun, 16 Nov 2014 09:14:05 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:33312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xq0aV-0007qO-Ra for emacs-devel@gnu.org; Sun, 16 Nov 2014 09:14:00 -0500 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xq0aD-0003QM-4a; Sun, 16 Nov 2014 15:13:41 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEX29e7+//z+/vj+//T+ //f+//j///z+//v///+VkpDX1Mpw/8cgAAACZklEQVQ4jXWUO2/bMBSFL5KhgafCQB/IlMhF4moK QtkpvEqy0bUWpYwtYl0RnhrHogxvycAS/QfypC01f2UvJSNpKudAgB7fvYeHDwjMfm3hglldLOEq yfHbJIvqdzaC5j4IonGOeS7TZOE/gR7zOMayQKtVVxYL51MNAo+FmCGfoER0zWPRdS5HMGXMC/wh AZnHiBkBA5UZQUotYZBYl1mMOXcr6EDVcSGjsXhEIE3iBEP/ZGvMB7lyASMWcs4Rlyzh6Aen+F4r reeA3OOyNmJeJKfsBOD8rK+PQVCUsSLQYxfe8Ia55UH1BrYuXAtEutAty9IbzwZOuaGnzRooImpE 6ZYb448zflpaGRpDJQkB7Hcqc0hVNdgQ0GlQ6AyzMwMwjDG5LU2nNBZkoUQV410PDs8Q1ZrKN6Vx 61Qqo2GEGqLQerE5OXCOS0OAx1nS1yRKodXtn8V5gfcdskr4NKZSpYUFa9q+x/PuCHQxWYZYAy20 wlUTdwRiOYhQ1UChmPF+Az6DmPkeUrW1IeA5DfhOgDFKWQOt7yY74AAtqB8L62WV4s/S0My3RxBH USSF+qJqoMRb06lIR4BpGK2oYwew37QCiF9BgGLnRFo4zoHjOC5NcMpRPQMbnNq/AvpJhvgMdloD Z2O7VS+E9jCMfWwBjWoOdJhQPAHRNGQ4BylpK55SqYYqsYa6/KUVrZCgrW0DRUtHgA6bbqXVv6lD JOr/VDYu+WR5/G/LfdMhNHJetLzmIJx3rJB7rMQDDNpLZYG6uWp9bsZIf2j1cR+gGfX2dFzv8anB 4jVw2W9HoknP4ZXfUvUXE/j9VtDRnx8AAAAASUVORK5CYII= X-Now-Playing: Leila's _Don't Fall Asleep_: "How Do You Want It?" X-Hashcash: 1:23:141116:schwab@linux-m68k.org::1mAWVEg9g3F4xUKF:00000000000000000000000000000000000000000kl5 X-Hashcash: 1:23:141116:emacs-devel@gnu.org::/tWeENo9SwVet5yk:000000000000000000000000000000000000000000C6eh In-Reply-To: <87y4rc9rhj.fsf@igel.home> (Andreas Schwab's message of "Sat, 15 Nov 2014 20:46:32 +0100") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1Xq0aD-0003QM-4a MailScanner-NULL-Check: 1416752021.23035@5jDVtITvhGid4lK8aIxkYA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:177293 Archived-At: Andreas Schwab writes: >> I had problems pushing to trunk now after doing a "git pull" on the main >> branch. The error message was, as usual, pretty obscure. > > And it was? It was lost in the mists of old xterms, but I did a new one. First the normal, expected push failure: [larsi@stories ~/src/emacs/trunk]$ git push To larsi@git.sv.gnu.org:/srv/git/emacs.git ! [rejected] emacs-24 -> emacs-24 (non-fast-forward) ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'larsi@git.sv.gnu.org:/srv/git/emacs.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. Then a pull that looks pretty normal: [larsi@stories ~/src/emacs/trunk]$ git pull --rebase remote: Counting objects: 203, done. remote: Compressing objects: 100% (126/126), done. remote: Total 126 (delta 109), reused 0 (delta 0) Receiving objects: 100% (126/126), 17.80 KiB, done. Resolving deltas: 100% (109/109), completed with 54 local objects. >From git.sv.gnu.org:/srv/git/emacs e68a171..6f167f9 master -> origin/master a6b4278..c613f4d emacs-24 -> origin/emacs-24 First, rewinding head to replay your work on top of it... Applying: Add faces for the VC modeline state indicator. Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging lisp/ChangeLog And now the push. I see that I was mistaken last time -- it did actually push my trunk change, but it's complaining about the emacs-24 branch, where I have no changes and that I didn't want to push. So... is the hint it's giving the correct thing to do, or is there some further configuration I should have done on the trunk to avoid these messages? [larsi@stories ~/src/emacs/trunk]$ git push Counting objects: 7, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 698 bytes, done. Total 4 (delta 3), reused 0 (delta 0) remote: Sending notification emails to: emacs-diffs@gnu.org To larsi@git.sv.gnu.org:/srv/git/emacs.git 6f167f9..48b2b32 master -> master ! [rejected] emacs-24 -> emacs-24 (non-fast-forward) error: failed to push some refs to 'larsi@git.sv.gnu.org:/srv/git/emacs.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. If you did not intend to push that branch, you may want to hint: specify branches to push or set the 'push.default' configuration hint: variable to 'current' or 'upstream' to push only the current branch. Anyway, if I then say: [larsi@stories ~/src/emacs/trunk]$ cd ../emacs-24/ [larsi@stories ~/src/emacs/emacs-24]$ git pull remote: Counting objects: 11, done. remote: Compressing objects: 100% (6/6), done. Unpacking objects: 100% (6/6), done. remote: Total 6 (delta 5), reused 0 (delta 0) >From git.sv.gnu.org:/srv/git/emacs c613f4d..cf100f6 emacs-24 -> origin/emacs-24 Updating a6b4278..cf100f6 Fast-forward .gitignore | 2 +- ChangeLog | 4 ++ admin/ChangeLog | 6 ++ admin/update_autogen | 28 ++++++++-- doc/emacs/ChangeLog | 6 ++ doc/emacs/misc.texi | 8 ++- lisp/ChangeLog | 32 +++++++++++ lisp/progmodes/js.el | 4 +- lisp/progmodes/python.el | 61 ++++++++++++-------- lisp/version.el | 4 +- lisp/window.el | 2 +- src/ChangeLog | 4 ++ src/frame.c | 2 +- test/ChangeLog | 11 ++++ test/automated/python-tests.el | 119 ++++++++++++++++++++++++++++++++++++++++ test/indent/js.js | 8 +++ 16 files changed, 263 insertions(+), 38 deletions(-) [larsi@stories ~/src/emacs/emacs-24]$ cd ../trunk/ [larsi@stories ~/src/emacs/trunk]$ git push Everything up-to-date So "git pull" on the "new-workdir"'ed branch made pushing on the trunk stop giving error messages. Which is kinda fun. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no