{"thread":{"id":"37219","subject":"Bug: git pull --rebase rewinds without applying commits in special workflow.","startedAt":"2014-07-26T13:17:29Z","lastAt":"2014-07-26T13:17:29Z","messageCount":1,"participants":["Andreas T.Auer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"246759","messageId":"53D3AA69.9040205@ursus.ath.cx","threadId":"37219","inReplyTo":null,"subject":"Bug: git pull --rebase rewinds without applying commits in special workflow.","fromName":"Andreas T.Auer","fromEmail":"andreas.t.auer_gtml_37453@ursus.ath.cx","sentAt":"2014-07-26T13:17:29Z","receivedAt":"2014-07-26T13:17:29Z","isPatch":false,"sender":{"key":"andreas.t.auer_gtml_37453@ursus.ath.cx","avatar":null},"body":"Hi,\n\nin our workflow commits can be removed from from the tip of the branch \nin the\ncentral repo. After this git pull --rebase on the \"client\" side may \"lose\"\ncommits, because the rewinding takes place without an fast-forwarding.\n\n\n$ git log --oneline master           # example repo with 3 commits\nb52b381 c3\nfaf6bbe c2\n2ad3897 c1\n\n$ git push origin master             # let the remote be up-to-date\n\n$ git push origin +master^^:master   # simulate removal on remote\n\n$ git pull --no-rebase               # pull without rebase works fine\nAlready up-to-date.                  # master points still to c3\n\n$ git pull --rebase --prune          # pull --rebase with pruning also works\nCurrent branch master is up to date. # master points still to c3\n\n$ git pull --rebase                  # git pull --rebase does part of \nits job\nFirst, rewinding head to replay your work on top of it...\n\n$ git log --oneline master           # commits c2 and c3 are \"lost\" on \nmaster\n2ad3897 c1\n\n\nThe actual workflow is that the commits are removed in the post-receive\nhook of the central repo and send to an automatic test. After this passes\nthe commit is sent to svn and the result is then put to the top of the\nbranch.In case of a failure, the user should still have his commits in\nhis repo, so he could amend it and send again.\nUsing -p with git pull is currently the workaround to this.\n\nRegards\nAndreas\n"}]}