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

Collapse history 2020 #27

Closed
jaraco opened this issue Dec 13, 2020 · 1 comment
Closed

Collapse history 2020 #27

jaraco opened this issue Dec 13, 2020 · 1 comment

Comments

@jaraco
Copy link
Owner

jaraco commented Dec 13, 2020

This skeleton project has had a single line of development with 207 commits. There's no way to collapse these commits for projects that have already merged them, but for future projects, this long history becomes more and more burdensome to adopt.

To that end, I've decided to do a periodic squash.

I created a new branch, archive/2020-12 to keep those commits and reset the mastermain branch to point to c681f67 (currently a single commit).

For convenience, I've also created a 2020-handoff branch to ease the transition and automate the reconciliation of these two branches for any repos already based on the commits in archive/2020-12.

@jaraco
Copy link
Owner Author

jaraco commented Jul 4, 2023

As I'm doing this again, I want to document the steps necessary to create the collapse:

git push origin HEAD:archive/YYYY-MM
git checkout --orphan collapse
git commit -m "Collapse skeleton history from archive/YYYY-MM"
git checkout origin/archive/2023-07
git merge --allow-unrelated-histories --no-edit collapse
git push origin HEAD:2023-handoff
git checkout main
git reset --hard collapse
git branch -d collapse
git push -f

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

1 participant