Advertisement
Guest User

Untitled

a guest
May 5th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #How to delete all repo commit history
  2.  
  3. 1. Checkout
  4. `git checkout --orphan latest_branch`
  5.  
  6. 2. Add all files
  7. `git add -A`
  8.  
  9. 3. Commit the changes
  10. `git commit -am "a commit message"`
  11.  
  12. 4. Delete the branch
  13. `git branch -D master`
  14.  
  15. 5. Rename the branch to "master"
  16. `git branch -m master`
  17.  
  18. 6. Force update your repository
  19. `git push -f origin master`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement