Guest User

Untitled

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