git - Remove a few commits far back in history -
we working on repository fellow programmer commits separate branch , on master.
few days ago decided merge master branch after merging faced environmental dependency issues , decided revert merge. , kept committing on.
now need merge branch master i'm having difficulties revert commit since it's deleting of files have not changed since merge.
i think can addressed deleting said merge , it's revert history.
now question how remove few commits far in history?
couple of strategies, try play with
git log
and
git reset --soft/--hard head@{numer}
where soft or hard reset type , number want go. can use gui sourcetree , cherrypic specific commit , create new branch.
note: make sure play in separate branch or have backup.
Comments
Post a Comment