doudou0720 我搞这个变基搞疯了(部分解决冲突的过程在编辑器上)
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $ gh stack sync
⚠ Branch "main" is the trunk of multiple stacks
? Which stack would you like to use? (main) <- dev/injection
✓ Switched to dev/injection
✓ Fetched latest main from origin
✓ Trunk main is ahead of origin/main — using the local branch
Rebasing stack ...
✗ Conflict detected rebasing dev/injection onto main
All branches restored to their original state.
Run `gh stack rebase` to resolve conflicts interactively.
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (dev/injection) $ gh stack rebase
✓ Fetched latest main from origin
✓ Trunk main is ahead of origin/main — using the local branch
Stack detected: (main) <- dev/injection
Rebasing branches in order, starting from dev/injection to dev/injection
⚠ Rebasing dev/injection onto main — conflict
Conflicted files:
C src/util.py
To resolve:
1. Open each conflicted file and look for conflict markers:
<<<<<<< HEAD (incoming changes from main)
=======
>>>>>>> (changes being rebased)
2. Edit the file to keep the desired changes and remove the markers
3. Stage resolved files: `git add <file>`
4. Continue: `gh stack rebase --continue`
Resolve conflicts on dev/injection, then run `gh stack rebase --continue`
Or abort this operation with `gh stack rebase --abort`
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (8c69222) $ gh stack sync
✗ failed to get current branch: failed to run git: not on any branch
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (8c69222) $ gh stack sync
⚠ Branch "main" is the trunk of multiple stacks
? Which stack would you like to use? (main) <- dev/injection
✗ failed to checkout branch dev/injection: failed to run git: error: Your local changes to the following files would be overwritten by checkout:
src/util.py
Please commit your changes or stash them before you switch branches.
Aborting
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $ git switch -
fatal: a branch is expected, got commit '8c6922213636acd36cd2b9edecd4b3e663dac2ed'
hint: If you want to detach HEAD at the commit, try again with the --detach option.
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $ git switch - main
fatal: only one reference expected
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $ git switch main
fatal: cannot switch branch while rebasing
Consider "git rebase --quit" or "git worktree add".
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $ git rebase --quit
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $ ghstack sync
bash: ghstack: command not found
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $ gh stack
sync
⚠ Branch "main" is the trunk of multiple stacks
? Which stack would you like to use? (main) <- dev/injection
✗ failed to checkout branch dev/injection: failed to run git: error: Your local changes to the following files would be overwritten by checkout:
src/util.py
Please commit your changes or stash them before you switch branches.
Aborting
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $ git push
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 2 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 997 bytes | 997.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To https://github.com/Jack-tendy-538/wipeout-ms-account
89de220..931b274 main -> main
@Jack-tendy-538 ➜ /workspaces/wipeout-ms-account (main) $
还是推main上了