git - Modify github history -
i apologize in advance asking question has been asked million times already.
i need modify git history of project, commit history looks this:
[e] <- [d] <- [c] <- [b] <- [a]
where: a: added code, b: added code & added data, c: restructured project, d: removed data, e: added code
the problem @ commit c our project group notified data had stored locally , not publicly on git. not experienced git first thing did remove data. did not since data still accessed in history. how fix problem history looks this:
[e] <- [c] <- [b] <- [a]
where: a: added code, b: added code, c: restructured project (without references data) e: added code
here way remove specific commit if history
git rebase --onto commit-id commit-id head
you can use below command remove commit "d" history
git rebase --onto d e head
Comments
Post a Comment