Repository navigation
Add revup reset command implementation - #218
zach-grant-skydio wants to merge 1 commit into
Conversation
|
Reviews in this chain: |
|
723d6c6 to
788f54c
Compare
- Add reset.py module with main reset functionality
- Add hard_reset() method to Git class in git.py
- Register reset command in revup.py parser and command handling
- Add documentation in docs/reset.md
The reset command performs 'git reset --hard @{u}' to reset the current
branch to match its upstream tracking branch.
Motivation:
When working with revup across multiple computers (specifically
important when working remotely with limited internet) it is often needed
to reset your local branch to what has been pushed by another computer
before continuing development. This adds a quick shortcut for doing
that.
Of course you can run the git command directly, or create an
alias, but that requires extra setup when using temporary machines such
as Coder instances frequently. This packages it neatly with revup.
topic: add-reset
branches: main
reviewers:
788f54c to
508e807
Compare
|
I'm somewhat unsure if this is the best approach but wanted to put it out there for comment. The goal here is to allow the user to easily make sure they are working on top of the latest changes in the revup stack that has been uploaded already. One thing I have been going back and forth on is if we would want this to reset to the upstream of the current branch you are working on (which would be a non-revup branch if you are working on master for instance) or if we want to always point to the revup created branch for the topic you are working on. This implementation is for the former, but I think the latter may actually make more sense. |
|
I'm certainly open to revup utilities but have to draw a line somewhere
If the functionality is so simple that it could be a one line bash macro, i don't think its worth the effort for this project to support, document, and maintain it |
The reset command performs 'git reset --hard @{u}' to reset the current
branch to match its upstream tracking branch.
Motivation:
When working with revup across multiple computers (specifically
important when working remotely with limited internet) it is often needed
to reset your local branch to what has been pushed by another computer
before continuing development. This adds a quick shortcut for doing
that.
Of course you can run the git command directly, or create an
alias, but that requires extra setup when using temporary machines such
as Coder instances frequently. This packages it neatly with revup.
topic: add-reset
branches: main
reviewers: