Created
February 21, 2024 21:42
-
-
Save d3ividdy/be712075e7c79c5545c64d6e0f3d5c39 to your computer and use it in GitHub Desktop.
Remove path permanent from local git
This file contains hidden or 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
# install git-filter-repo | |
sudo python3 -m pip install --user git-filter-repo | |
# add filter-repo in path for exec lib | |
export PATH="/root/.local/bin:$PATH" | |
# filter path (or file) in local repository | |
git filter-repo --invert-paths --path <path> --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git remote add origin https://github.com/OWNER/REPOSITORY.git
git push origin --force --all