You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this library will mostly be used by automated systems, it would be useful if it could cleanly handle the case of wiping and pushing new changes to an existing branch.
One way to do that in git is:
pull down the latest version of main
checkout the given feature branch
git reset --hard origin/main
allow the user to make code changes
commit the changes
force push the contents to remote
Potential interface:
withforce_push_to_feature_branch(branch_name):
# Make code changes
This could raise exceptions if:
There were no code changes
The branch name given didn't exist
On exit, the context manager would abandon any uncommitted changes, and checkout main, leaving the repo in a clean state.
The text was updated successfully, but these errors were encountered:
Use Case
Since this library will mostly be used by automated systems, it would be useful if it could cleanly handle the case of wiping and pushing new changes to an existing branch.
One way to do that in git is:
Potential interface:
This could raise exceptions if:
On exit, the context manager would abandon any uncommitted changes, and checkout main, leaving the repo in a clean state.
The text was updated successfully, but these errors were encountered: