Last active
July 29, 2024 06:02
-
-
Save phanect/f6f3bd790585fc8f5a3ef5bd0fe0cfbb to your computer and use it in GitHub Desktop.
Collection of Git command snippets
git filter-repo --invert-paths --path "PATH_TO_FILE_TO_DELETE"
List all committers in addition to the author on git log
and git show
.
git log --pretty=fuller | grep Author: | sort -u
git log --pretty=fuller | grep Commit: | sort -u
git remote add -f repo-a [email protected]:someone/repo-a.git
git merge repo-a/main --allow-unrelated-histories
See: https://medium.com/altcampus/how-to-merge-two-or-multiple-git-repositories-into-one-9f8a5209913f
git rebase --ignore-whitespace main
echo -e "Jumpei Ogawa <[email protected]> <[email protected]>\nJumpei Ogawa <[email protected]> <[email protected]>" | tee ./mailmap
git filter-repo --mailmap mailmap
git log --pretty=fuller
git show COMMIT__HASH --pretty=fuller
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment