Create a Truncate Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git checkout --orphan temp $1 | |
git commit -m "First commit" | |
git rebase --onto temp $1 master | |
git branch -D temp |
Use the Commit Sha to Truncate To
source ~/data/bin/git-truncate a71f4386f9d5e3b707067e66fd5f76a1cc06c11c
Force the Push to Origin
git push origin master --force
No comments:
Post a Comment