[haiku-development] FYI: Be sure to do a --rebase during your git pull

  • From: Alexander von Gluck <kallisti5@xxxxxxxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Sat, 12 Nov 2011 14:32:32 -0600

Keep in mind you will need to rebase the tree if changes have occurred prior to your push..


If you do this:
  <local changes>
  git commit -a -m "my changes"
  <others make changes to origin/remote>
  git pull
  git push

You will get an ugly and confusing nonlinear commit trail on the server:
http://cgit.haiku-os.org/haiku/log/ (hrev43243)

This happens because the merge is happening on the server vs your local box.


This is what should be done:
  <local changes>
  git commit -a -m "my changes"
  <others make changes to origin/remote>
  git pull --rebase
  git push


The nonlinear push can be blocked server side (and warn the end user), but would require a hook in
the repo.

Blocking this action also may get the user stranded in a tough spot as he couldn't push his repo to origin... but that may be a good thing to get everyone in the habit.

 -- Alex

Other related posts: