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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -