Fix messed up branch state before v3 release
See original GitHub issueProblem
Because we branched off v3 and later made that the default branch, some PRs sneaked into master when they shouldn’t have. We also did a release off master and not v3 so they got further out of sync.
Solution
In order to release everything and get the branches in a good state again I suggest we do the following:
- https://github.com/xtermjs/xterm.js/pull/1185 Merge
master
intov3
, this will be a small easy to understand PR that’s easy to sign off on and that we know is in a good state as it’s based onv3
. - https://github.com/xtermjs/xterm.js/pull/1186 Merge
v3
intomaster
, this diff will contain everything in the release so it can’t really be reviewed - Mark
master
as the default branch - Update package.json version in
master
to 3.0.0 - Release 3.0.0 from
master
(@parisk to sign commit) - Branch off
release/3.0
from `master - Tag
HEAD
ofrelease/3.0
as 3.0.0 - Move all PRs to point at
master
branch - Publish release in Github
If we need to release 3.0.1+ then we can add the commits to master
, cherry pick them to release/3.0
and release again. We can then continue this process for 3.1 with release/3.1
and so on to avoid these sorts of problems in the future; the master
branch will always be the latest and we branch off stabilization branches for release.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Git tip: how to fix an accidental commit on the wrong branch
move your commit to a new branch; restore your master to it's previous state. This can be done in 3 simple steps. Create...
Read more >How to fix committing to the wrong Git branch? - Stack Overflow
Replace origin/master with the commit you want your master branch to point to. For example, use HEAD~3 if you want it to point...
Read more >Git happens! 6 Common Git mistakes and how to fix them
Note: Make sure you commit or stash your changes first, or all will be lost! This creates a new branch, then rolls back...
Read more >Git Detached Head: What Is It & How to Recover
Git detached head might be a weird error message, but don't despair. Learn what this means and how to fix it!
Read more >On undoing, fixing, or removing commits in git - Seth Robertson
Another option is to abandon the branch you merged from, recreate it from the previous merge-base with the commits since then rebased or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And it’s out!
Congratulations on this major milestone! 🥇 🏆🍾🎉