Last active
August 17, 2020 10:26
-
-
Save kunathj/1f58d236e5a54237e7ac34c7ef0fc22e to your computer and use it in GitHub Desktop.
Git
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
# Show all files in the history. | |
git log --pretty=format: --name-only --diff-filter=A | sort -u | |
# Remove some files (F). | |
git filter-branch --tree-filter 'rm -f F' HEAD | |
# If you want to iterate this, it is necessary to remove the | |
# .git/refs/original folder. | |
rm -r .git/refs/original/ | |
# Now we can push the repo back up to the origin. | |
# Clearly it is necessary that we are the only ones working with the repo | |
# right now. |
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
# List the authors contibuting to a repo | |
git shortlog -s | |
# Incorporte remote chanegs to the repo. | |
git fetch origin | |
git reset --hard origin/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment