all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: emacs-devel@gnu.org
Subject: Re: A simple git workflow for the rest of us
Date: Sun, 16 Nov 2014 15:13:40 +0100	[thread overview]
Message-ID: <m38ujbgrmz.fsf@stories.gnus.org> (raw)
In-Reply-To: <87y4rc9rhj.fsf@igel.home> (Andreas Schwab's message of "Sat, 15 Nov 2014 20:46:32 +0100")

Andreas Schwab <schwab@linux-m68k.org> 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



  reply	other threads:[~2014-11-16 14:13 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-15 16:09 A simple git workflow for the rest of us Lars Magne Ingebrigtsen
2014-11-15 16:38 ` Eli Zaretskii
2014-11-15 17:08   ` Lars Magne Ingebrigtsen
2014-11-16  2:57     ` Ted Zlatanov
2014-11-15 17:43   ` Achim Gratz
2014-11-15 18:04     ` Eli Zaretskii
2014-11-15 17:39 ` Achim Gratz
2014-11-15 17:47   ` Lars Magne Ingebrigtsen
2014-11-15 19:47     ` Karl Fogel
2014-11-16 19:05     ` Bill Wohler
2014-11-22  9:23     ` Steinar Bang
2014-11-22 13:35       ` Lars Magne Ingebrigtsen
2014-11-22 15:00         ` Steinar Bang
2014-11-22 15:26           ` Lars Magne Ingebrigtsen
2014-11-15 18:17   ` Andreas Schwab
2014-11-15 20:20   ` Kelvin White
2014-11-15 20:54     ` Kelvin White
2014-11-16 19:33   ` Bill Wohler
2014-11-16 19:43     ` Lars Magne Ingebrigtsen
2014-11-16 20:12       ` Ted Zlatanov
2014-11-16 20:19     ` Eli Zaretskii
2014-11-22  9:29     ` Steinar Bang
2014-11-23 18:28       ` Bill Wohler
2014-11-24 15:25         ` Sergey Organov
2014-11-15 19:08 ` Lars Magne Ingebrigtsen
2014-11-15 19:46   ` Andreas Schwab
2014-11-16 14:13     ` Lars Magne Ingebrigtsen [this message]
2014-11-16 14:34       ` David Engster
2014-11-16 14:42         ` Lars Magne Ingebrigtsen
2014-11-16 14:50           ` David Engster
2014-11-16 14:54             ` Lars Magne Ingebrigtsen
2014-11-16 15:19             ` David Kastrup
2014-11-16 14:36       ` Achim Gratz
2014-11-16  2:15 ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m38ujbgrmz.fsf@stories.gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.