Skip to content

Instantly share code, notes, and snippets.

View Chocobo1's full-sized avatar
💭
I may be slow to respond.

Chocobo1

💭
I may be slow to respond.
View GitHub Profile
@Chocobo1
Chocobo1 / git_clear_history.sh
Last active March 16, 2017 06:25
Reset Git history
#!/bin/sh
# from: http://stackoverflow.com/a/13102849
git checkout --orphan newMaster
git add -A # Add all files and commit them
git commit -m "Initial commit"
git branch -D master # Deletes the master branch
git branch -m master # Rename the current branch to master
#git push -f origin master # Force push master branch to github