OOOOPS
Friedrich W. H. Kossebau
kossebau at kde.org
Sat Jan 24 21:56:51 GMT 2015
Am Samstag, 24. Januar 2015, 22:42:44 schrieb René J.V. Bertin:
> On Saturday January 24 2015 19:28:48 Jaroslaw Staniek wrote:
> > Yep, that was not a big oops. Especially that, René, you're doing a great
> > work!
> <blush>
>
> I think that in the end only the history was messed up a bit, right? I did a
> complete new checkout "the morning after", and found it equal to my working
> copy of the 2.9 branch, and to contain all the changes that were made just
> before my clumsy commit. So unless I really don't understand git, I think
> nothing was lost, right?
Right. Seems all fine to me as well.
IMHO what has happened was that you had a local commit
36f11036e6e5d8ff3a93676e2157083bbf8331c4 added to your local copy of the
calligra/2.9 branch, when at the same time others pushed more commits to the
central calligra/2.9 branch. And then did a "git pull", this resulted in your
local modified branch being merged into the updated version of the branch as
fetched from the central calligra/2.9 branch.
So similar to as if you created a branch, added a commit to it, while others
added commits to the main branch, and then you merge it back.
So always do "git pull --rebase" if you have locally commits added which are
not synced yet.
Or go explocit and just "git fetch" and then "git merge --ff-only
origin/branch", that will fail if your copy of the branch has conflicting
commits.
More details at http://git-scm.com/docs/git-pull :)
And yes, for a easy to look-at history merges should be avoided, so this was a
small ooops ;) But no real harm done, can and does happen once in a while to
everyone.
Cheers
Friedrich
More information about the calligra-devel
mailing list