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

Big files in repo #76

Closed
albertz opened this issue Jun 10, 2022 · 5 comments
Closed

Big files in repo #76

albertz opened this issue Jun 10, 2022 · 5 comments

Comments

@albertz
Copy link
Member

albertz commented Jun 10, 2022

RASR executables, maybe other stuff.

For example in 2021-ADSM (@ZhouW321).

Should be removed. On Slack we agreed that rewriting the Git history in this (exceptional!) case is ok (for this repo here only!).

@ZhouW321
Copy link
Contributor

executables removed, anything else ?

@albertz albertz reopened this Jun 10, 2022
@albertz
Copy link
Member Author

albertz commented Jun 10, 2022

Yes the Git history now needs to be rewritten, as explained.

@ZhouW321
Copy link
Contributor

ZhouW321 commented Jun 10, 2022

ok

@albertz
Copy link
Member Author

albertz commented Jun 11, 2022

For reference, this is even explained in the GitHub docs. Also here, here. But as we discussed, I will do that.

@albertz
Copy link
Member Author

albertz commented Jun 13, 2022

I now cleaned it up using BFG, with a limit of 3MB for files (basically just bfg -b 3M).

This means that I now changed the master branch history.

This means, next time you pull in an existing cloned repo, you might see sth like:

$ git pull
remote: Enumerating objects: 57, done.
remote: Counting objects: 100% (57/57), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 57 (delta 18), reused 57 (delta 18), pack-reused 0
Unpacking objects: 100% (57/57), 8.40 KiB | 477.00 KiB/s, done.
From github.com:rwth-i6/returnn-experiments
 + a0ca3bf...a2c804a master     -> origin/master  (forced update)
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

I did git pull -r and that worked. I.e. afterwards, git status displays:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

This is important. You should not see any new things to be committed there. Your branch should be up to date now.

I'm not sure if git pull -r always works or whether it might reintroduce the bad files in some cases, or break in other cases. Double check git status.

If this somehow does not work for you, just clone the repo again.

In the future, please always check that you are not adding big files.
(Maybe we can enforce this. See #77.)

@albertz albertz closed this as completed Jun 13, 2022
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

2 participants