Skip to content

Instantly share code, notes, and snippets.

@d3ividdy
Created February 21, 2024 21:42
Show Gist options
  • Save d3ividdy/be712075e7c79c5545c64d6e0f3d5c39 to your computer and use it in GitHub Desktop.
Save d3ividdy/be712075e7c79c5545c64d6e0f3d5c39 to your computer and use it in GitHub Desktop.
Remove path permanent from local git
# 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
@d3ividdy
Copy link
Author

git remote add origin https://github.com/OWNER/REPOSITORY.git

git push origin --force --all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment