From: "Andreas T.Auer" <andreas.t.auer_gtml_37453@ursus.ath.cx>
To: git@vger.kernel.org
Subject: Bug: git pull --rebase rewinds without applying commits in special workflow.
Date: Sat, 26 Jul 2014 15:17:29 +0200 [thread overview]
Message-ID: <53D3AA69.9040205@ursus.ath.cx> (raw)
Hi,
in our workflow commits can be removed from from the tip of the branch
in the
central repo. After this git pull --rebase on the "client" side may "lose"
commits, because the rewinding takes place without an fast-forwarding.
$ git log --oneline master # example repo with 3 commits
b52b381 c3
faf6bbe c2
2ad3897 c1
$ git push origin master # let the remote be up-to-date
$ git push origin +master^^:master # simulate removal on remote
$ git pull --no-rebase # pull without rebase works fine
Already up-to-date. # master points still to c3
$ git pull --rebase --prune # pull --rebase with pruning also works
Current branch master is up to date. # master points still to c3
$ git pull --rebase # git pull --rebase does part of
its job
First, rewinding head to replay your work on top of it...
$ git log --oneline master # commits c2 and c3 are "lost" on
master
2ad3897 c1
The actual workflow is that the commits are removed in the post-receive
hook of the central repo and send to an automatic test. After this passes
the commit is sent to svn and the result is then put to the top of the
branch.In case of a failure, the user should still have his commits in
his repo, so he could amend it and send again.
Using -p with git pull is currently the workaround to this.
Regards
Andreas
reply other threads:[~2014-07-26 13:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=53D3AA69.9040205@ursus.ath.cx \
--to=andreas.t.auer_gtml_37453@ursus.ath.cx \
--cc=git@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).