Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git push after cleanup #93

Open
jossi opened this issue Jun 21, 2015 · 3 comments
Open

git push after cleanup #93

jossi opened this issue Jun 21, 2015 · 3 comments

Comments

@jossi
Copy link

jossi commented Jun 21, 2015

If using BitBucket, running git push after cleanup, as per the documentation, it does not remove the previous history. I went from a 1.7 GB repo to a 2.4 GB repo after the push.

To avoid this, push --mirror into a new repo.

git push --mirror git@bitbucket.org:accountname/new-repo.git

@agilgur5
Copy link

Based on https://help.github.com/articles/remove-sensitive-data/, it would seem that this command is missing:
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
before the two clean up commands

@nishatafshan
Copy link

I am unable to push after the clean up steps.
Counting objects: 217307, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (80946/80946), done.
Writing objects: 100% (214361/214361), 666.42 MiB | 1.15 MiB/s, done.
Total 214361 (delta 118358), reused 209184 (delta 114750)
remote: You are attempting to update refs that are reserved for Stash's pull request
remote: functionality. Stash manages these refs automatically, and they may not be
remote: updated by users.
remote:
remote: Rejected refs:
remote: refs/pull-requests/190/from
remote: refs/pull-requests/247/from
remote: refs/pull-requests/247/merge
To ssh://git@repo.git
! [remote rejected] Branch1 -> Branch1 (pre-receive hook declined)
! [remote rejected] Branch2 -> Branch2 (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@repo.git'

@javabrett
Copy link
Contributor

See comment on #41 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants