Reputation:
I accidentally committed changes before pulling the latest version from the repository, and know I am stuck with this:
changeset: 79:8092df3d1614
tag: tip
user: Daniel
date: Thu Jun 29 16:55:35 2017 +0100
summary: removed missing files
changeset: 76:8ce070e31679
parent: 74:724b36f18d94
user: Daniel
date: Thu Jun 29 02:06:37 2017 +0100
summary: revision
When I push I get abort:
push creates new remote head 8092df3d1614
How can I fix this?
Upvotes: 1
Views: 704
Reputation: 489848
In general you should combine your changes with the other changes, either by merging or by rebasing. See Hg: How to do a rebase like git's rebase, which has several examples.
It is possible to push the extra head anyway, using the force flag. The reason not to do this is that others will no longer know which head is "headier": which one should they use? The reason to do this is that you may not know how to, or want to, merge or rebase your changes; you and your colleagues may wish to fork the development within a single branch (perhaps using bookmarks, which will help you and your colleages track which head is headier, for which purpose).
The final course of action to take is up to you (and your colleagues).
Upvotes: 1