git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git loses commits on git pull --rebase with Dictator and Lieutenants Workflow

From
Chris Packham <judge.packham@gmail.com>
Date
Jan 29, 2015, 18:08 UTC
Message-ID
<CAFOYHZBs=r016FE6ENOnYMs85D9XetTWtVR+faBL5Sj-91=ezg@mail.gmail.com>
In-Reply-To
<CAFOYHZDLPr1sJ2Agyq6tT=ahpgNp=eL_Q4c=-iDd9i_JqFNTcg@mail.gmail.com>
On Fri, Jan 30, 2015 at 6:27 AM, Chris Packham <judge.packham@gmail.com> wrote:
Show 50 quoted lines
> Hi,
>
> On Thu, Jan 29, 2015 at 8:49 AM, Dick <dick@mrns.nl> wrote:
>> Hi all,
>>
>> I've encountered a problem with the Dictator and Lieutenants Workflow. I've
>> configured remote origin so it pulls from the "blessed repository" and
>> pushes to the "developer public" repository.
>>
>> When the "blessed repository" has the same branch name as the "developer
>> public" repository git pull seems to drop commits.
>>
>> I've create a test script to demonstrate, left is the blessed repository,
>> right.git is the developer public and right is the developer private
>> repository.
>>
>> rm -rf left/ right/ right.git/
>> git init left
>> cd left/
>> echo "hello world" > test.txt
>> git add test.txt
>> git commit -m .
>> cd ..
>> git clone --bare left right.git
>> git clone right.git/ right
>> cd right
>> git remote set-url origin ../left
>> git remote set-url origin --push ../right.git
>> echo "bye world" >> test.txt
>> git commit -a -m .
>> git push
>> git log
>> echo "start: two commits, ok"
>> git fetch
>> git rebase origin/master
>> git log
>> echo "manual fetch/rebase: two commits, still ok"
>> git pull --rebase
>> git log
>> echo "pull: one commits, oops?"
>>
>> Am I using git wrong or is this a git bug?
>>
>> Thanks for having a look!
>>
>> Dick
>
> I can confirm the behaviour that Dick is seeing with git 2.0.4
> (happens to be what I was running on my laptop). Just rebuilding
> 2.3.0-rc2 now.
Also happens on 2.3.0-rc2
Show 5 quoted lines
>
> AFAIK 'git fetch && git rebase origin/master' and 'git pull -r' in the
> scenario above should be roughly equivalent.
>
> I'll see if I can work the testcase above into an actual test script.
Previous: Chris PackhamNext: Junio C Hamano
Message 3 of 7 in “git loses commits on git pull --rebase with Dictator and Lieutenants Workflow”
  1. DickJan 28, 2015
  2. Chris PackhamJan 29, 2015
  3. Chris PackhamJan 29, 2015
  4. Junio C HamanoJan 29, 2015
  5. DickJan 29, 2015
  6. Re* git loses commits on git pull --rebase with Dictator and Lieutenants WorkflowJunio C Hamano, Jan 29, 2015
  7. Eric SunshineJan 29, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.