Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [incubation] Delete top commit from git master branch

On 09/20/2016 04:51 PM, Alois Z. wrote:
Hi,
 
not sure if this is a question for incubation but as I'm rather new to git and git on Eclipse I thought it could be a good place.
 
As described in the subject my problem is that I was a little to quick in gerrit and added a commit to the master branch which should have gone to another branch. In the meantime I was able to cherry pick the commit to the intended branch but I'm not able to delete it from my master branch on the remote git repo @ eclipse.org. I know that this is in general bad but it would really help me if I could delete the last commit on my master branch.
Going back into the history is bad and very dangerous. I'm not even sure if Eclipse Git repo allow such non-fast-forward changes.
Did you consider creating a revert commit instead? It would add a "fix commit" that would restore your code in its initial state, without any sort of risk related to overriding history and loosing hundreds of hours of work,
--
Mickael Istria
Eclipse developer for Red Hat Developers
My blog - My Tweets

Back to the top