Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I apply changes in history

Uran110
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 1, 2025

 

Hi. I can't change history for origin
I've did
1) I found files which were deleted but they presented in history

git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort -nr -k2 | head -n 30

2) I've used this tool like this example


java -jar bfg.jar --delete-files export.sql

3) Than

git reflog expire --expire=now --all && git gc --prune=now --aggressive

4) check existence 

git log --all -- export.sql

5) check results

 git count-objects -vH

6) and here I tried to apply my changes to origin

git push --force --all

but origin doesn't have my changes. how can I do it in normal way?
And
another question 
when I try to apply it for instance my changes on developer server
what should I do?

on developer

git fetch origin 
git rebase origin/developer

 

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 2, 2025

Hi @Uran110 

I executed a gc but this didn't reduce the size by much (only 100mb).

I'll need access to your repo in the backend, so I've opened a ticket on your behalf - please check your email and we will continue our conversation there.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events