[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A simple git workflow for the rest of us
From: |
Lars Magne Ingebrigtsen |
Subject: |
Re: A simple git workflow for the rest of us |
Date: |
Sun, 16 Nov 2014 15:13:40 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Andreas Schwab <address@hidden> 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:
address@hidden ~/src/emacs/trunk]$ git push
To address@hidden:/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 'address@hidden:/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:
address@hidden ~/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?
address@hidden ~/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: address@hidden
To address@hidden:/srv/git/emacs.git
6f167f9..48b2b32 master -> master
! [rejected] emacs-24 -> emacs-24 (non-fast-forward)
error: failed to push some refs to 'address@hidden:/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:
address@hidden ~/src/emacs/trunk]$ cd ../emacs-24/
address@hidden ~/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(-)
address@hidden ~/src/emacs/emacs-24]$ cd ../trunk/
address@hidden ~/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
- Re: A simple git workflow for the rest of us, (continued)
- Re: A simple git workflow for the rest of us, Achim Gratz, 2014/11/15
- Re: A simple git workflow for the rest of us, Lars Magne Ingebrigtsen, 2014/11/15
- Re: A simple git workflow for the rest of us, Andreas Schwab, 2014/11/15
- Re: A simple git workflow for the rest of us,
Lars Magne Ingebrigtsen <=
- Re: A simple git workflow for the rest of us, David Engster, 2014/11/16
- Re: A simple git workflow for the rest of us, Lars Magne Ingebrigtsen, 2014/11/16
- Re: A simple git workflow for the rest of us, David Engster, 2014/11/16
- Re: A simple git workflow for the rest of us, Lars Magne Ingebrigtsen, 2014/11/16
- Re: A simple git workflow for the rest of us, David Kastrup, 2014/11/16
- Re: A simple git workflow for the rest of us, Achim Gratz, 2014/11/16
Re: A simple git workflow for the rest of us, Glenn Morris, 2014/11/15