Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Remove file from git

Asif Alamgir March 22, 2022

I have commited large files by mistake, cant rm or push anymore

2 answers

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 22, 2022

Hi, @Asif Alamgirthank you for reaching out to Atlassian Community.

Could you please tell me the last 3 letters of the name of this workspace and repository, so I can identify it? We can either run a GC to remove dangling commits to try to reduce its size, or we can temporarily increase the repo size to allow you to push the changes without these large files once you remove them locally.

Please let me know if you have any questions regarding this case.

Kind regards,
Caroline

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2022

You need to rewind the last commit, please have a look at this KB on how to do that. You will have to reverse that push by rewinding the history by creating a new temp branch, reset the original branch to a commit before the last one, force push the new head, and then restore your changes. Once you enabled Git LFS you can push those changes. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events