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 rewrite #33399

Closed
maxime-desroches opened this issue Aug 28, 2024 · 0 comments
Closed

git rewrite #33399

maxime-desroches opened this issue Aug 28, 2024 · 0 comments

Comments

@maxime-desroches
Copy link
Contributor

maxime-desroches commented Aug 28, 2024

We are rewriting the entire git history of openpilot for 2 reasons:

  1. Make it small for fast cloning
  2. Connect the old devel branch to the start of the current master branch.

More context here.

See here for an example that you can clone right now.

Rewrite schedule on Tuesday, September 3, 2024

Step 1 [21:30 (PST)] : Send final warning to everybody about the rewrite.
Step 2 [22:00 (PST)] : Start of the rewrite.
Step 3 [22:30 (PST)] : End of the rewrite. Check the appropriate section below for what to do now.

After the rewrite for fork maintainers and contributors

All you PRs made againt openpilot will be closed!

To re-open your PR from branch <branch> that contains commits A to B:

git remote add comma git@github.com:commaai/openpilot
git fetch comma master
git checkout -b <branch>_duplicate comma/master

# A is the first commit of <branch> since master and B is the last commit of <branch>
# You might have to solve some merge conflicts
git cherry-pick A^..B

git branch -D <branch>
git branch -m <branch>
git push -f git@github.com:<your_username>/openpilot <branch>

You can now go on your fork's GitHub page and create a PR as usual

After the rewrite for comma employee

All the internal upstream branches will be rebased for you.

To update your local <branch> :

git fetch origin <branch>
git checkout <branch>

# THIS WILL RESET YOUR WORKING TREE AND ALL COMMITS THAT WERE NOT PUSHED!
# Save your work if you want to restore/apply it afterward
git reset --hard origin/<branch>

Important: References to openpilot commit hashes won't be valid anymore. We stored the old hashes as the last line of the body of all the commits. Replace references to old commits with the new hashes if you find any.

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