How to remove Objects to be pushed to origin/main that is listed by git lfs status #135025
Replies: 3 comments
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
To push changes to your fork while excluding Git LFS files, you’ll need to remove them from the commit history and ensure they aren’t tracked by Git LFS anymore. Here’s how to proceed:
Since you’ve already tried git lfs untrack, verify that the .gitattributes file no longer contains entries for those files. You can open the .gitattributes file and manually remove any lines that mention the LFS files.
To remove these files from your Git history, you can use git filter-repo or git filter-branch. Here’s how to do it with git filter-repo:
pip install git-filter-repo
git filter-repo --path assets/examples/driving/aggrieved.pkl --path assets/examples/driving/laugh.pkl --path assets/examples/driving/open_lip.pkl --path assets/examples/driving/shake_face.pkl --path assets/examples/driving/shy.pkl --path assets/examples/driving/talking.pkl --path assets/examples/driving/wink.pkl --path src/utils/resources/clip_embedding_68.pkl --path src/utils/resources/clip_embedding_9.pkl --invert-paths This will remove these files from the entire Git history.
After filtering the repository, you need to force push the changes to your fork to update the repository. git push origin main --force
To ensure no LFS files are left for push: git lfs status If the status still shows LFS objects, you may need to run a garbage collection for LFS: git lfs prune
Once you’ve verified that no LFS files are being tracked or pushed, try the git push command again. This process should help you sync your fork without including the LFS files. However, be cautious with force-pushing and modifying Git history, especially if others are collaborating on the repository. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I have a fork and original repo owner is out of quote so i am not able to push.
Here what I did. I have fork. It is behind and front main repo. I made a pull request from main repo. Fixed conflicts locally. And then trying to push new changes to forked repo now. So they will be in sync + my changes
My account has 50 GB quote and i asked this to GitHub support they gave me this answer
So I am trying to push all the changes to my fork except the LFS files
I have tried every combination but still couldn't remove files from git history
Any help appreciated
Here messages and results
Beta Was this translation helpful? Give feedback.
All reactions