Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # <f> = SHA Code "ex. ea69188941"
- git checkout --orphan temp <f> # checkout to the status of the git repo at commit f; creating a branch named "temp"
- git commit -m "new root commit" # create a new commit that is to be the new root commit
- git rebase --onto temp <f> master # now rebase the part of history from <f> to master onthe temp branch
- git branch -D temp # we don't need the temp branch anymore
- git push -f
- # The following 2 commands are optional - they keep your git repo in good shape.
- git prune --progress # delete all the objects w/o references
- git gc --aggressive # aggressively collect garbage; may take a lot of time on large repos
Add Comment
Please, Sign In to add comment