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

Remove all git history in gh-pages branch #375

Closed
rob-luke opened this issue Sep 11, 2021 · 4 comments
Closed

Remove all git history in gh-pages branch #375

rob-luke opened this issue Sep 11, 2021 · 4 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed infrastructure

Comments

@rob-luke
Copy link
Member

Describe the new feature or enhancement

Cloning the repository takes 383 MiB. This is due to the gh-pages taking XXX MiB.

git clone [email protected]:mne-tools/mne-nirs.git
Cloning into 'mne-nirs'...
remote: Enumerating objects: 35897, done.
remote: Counting objects: 100% (2901/2901), done.
remote: Compressing objects: 100% (819/819), done.
remote: Total 35897 (delta 2371), reused 2451 (delta 2048), pack-reused 32996
Receiving objects: 100% (35897/35897), 383.56 MiB | 6.19 MiB/s, done.
Resolving deltas: 100% (29581/29581), done.


git clone [email protected]:mne-tools/mne-nirs.git --branch main --single-branch
Cloning into 'mne-nirs'...
remote: Enumerating objects: 2365, done.
remote: Counting objects: 100% (172/172), done.
remote: Compressing objects: 100% (126/126), done.
remote: Total 2365 (delta 80), reused 88 (delta 43), pack-reused 2193
Receiving objects: 100% (2365/2365), 1.05 MiB | 1.33 MiB/s, done.
Resolving deltas: 100% (1429/1429), done.


git clone [email protected]:mne-tools/mne-nirs.git --branch gh-pages --single-branch
Cloning into 'mne-nirs'...
remote: Enumerating objects: 33800, done.
remote: Counting objects: 100% (2822/2822), done.
remote: Compressing objects: 100% (722/722), done.
remote: Total 33800 (delta 2375), reused 2429 (delta 2069), pack-reused 30978
Receiving objects: 100% (33800/33800), 383.02 MiB | 6.24 MiB/s, done.

Describe your proposed implementation

Somehow delete all history from the gh-pages branch.

Preferably this is done automatically via a GitHub action etc.

Worst case there is some manual procedure which will happen each release cycle.

Describe possible alternatives

Whats the best way to do this? I can't be the first person to have this issue.

@rob-luke rob-luke added documentation Improvements or additions to documentation help wanted Extra attention is needed infrastructure labels Sep 11, 2021
@larsoner
Copy link
Member

In MNE-Python we manually squash all commits between releases as part of the release tasks so we at least have some history. This isn't painful for us because in between releases the docs live in a separate repo so git fetch upstream for MNE-Python isn't affected.

mne-realtime similarly clones mne-tools.github.io and then pushes directly to its subdirectory, and therefore benefits from the manual MNE-Python squashes.

It looks like mne-bids-pipeline uses --no-history to keep it at one commit, which is another option (probably what I'd try here first rather than going the mne-tools.github.io route). I assume @hoechenberger you have been happy with this approach?

One question from me -- I have never understood how mne-tools.github.io/mne-connectivity and mne-tools.github.io/mne-nirs resolve to these gh-pages branches. @hoechenberger @adam2392 @rob-luke can one of you enlighten me?

@rob-luke
Copy link
Member Author

can one of you enlighten me?

Actually I cant @larsoner, this was just how it worked when I moved the repository under the MNE umbrella organisation. I had actually assumed you or @agramfort had set this up.

@hoechenberger
Copy link
Member

It looks like mne-bids-pipeline uses --no-history to keep it at one commit, which is another option (probably what I'd try here first rather than going the mne-tools.github.io route). I assume @hoechenberger you have been happy with this approach?

Yep, that's what we're doing for the BIDS Pipeline, no complaints so far ;)

@rob-luke
Copy link
Member Author

Thanks everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants