Last active
September 28, 2020 20:22
-
-
Save akihiroy/1fc8ba286e6e84f6d07659b93dcd23b7 to your computer and use it in GitHub Desktop.
git example
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
# Clean up backup and loose objects. | |
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
# 全ての履歴に .gitignore / .gitattributes を追加する | |
git filter-branch --index-filter "cp -t ./ ../.gitignore ../.gitattributes && git add .gitignore .gitattributes" -f -- --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment