spr
spr copied to clipboard
Workflow for syncing to another machine?
I did something like this:
git checkout -b feature-1
# make commit 1
# make commit 2
git spr update # created two PRs
Then I switched to another machine. I was able to figure out that I could
git fetch --all
git branch -a
git show remotes/origin/pr/dhalperi/feature-1/<commit>
to figure out which was the top of the stack, then
git checkout remotes/... -b feature-1
followed by git spr status
to confirm it worked.
Is that the intended workflow?
Was I supposed to also git push --force feature-1
? Somehow, pushing feature-1
myself seems anathema given that git spr
is managing all the remote state?
This isn't intended and is untested, but I think it should work ok as long as you rename the branch you fetched as you did. git spr doesn't store any state, so theoretically you should be able to pickup your work on a new machine this way. I don't think you need to force push, calling spr update on the new machine should just work?
you can now use 'git spr sync' for this. Thank you @adambenhassen for adding this feature.