Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parking interim work in a branch, the post hoc version #19

Open
jennybc opened this issue Nov 26, 2019 · 0 comments
Open

Parking interim work in a branch, the post hoc version #19

jennybc opened this issue Nov 26, 2019 · 0 comments

Comments

@jennybc
Copy link
Member

jennybc commented Nov 26, 2019

Possible addition to the intermediate workflows lesson:

When you belatedly recognize you should have been working in a branch. You're working on master, intending to X. But then X becomes much more involved than you anticipated. Or you got sidetracked by Y. In any case, you find yourself with lots of unrelated changes and you've taken everything apart but not put it back together nicely again. You may or may not have committed (usually not) and pushed (almost certainly not). BACK OUT! But without throwing away this work (yet).

What now? Commit the whole mess as "WIP". Create (and checkout) a messy-wip branch for the current mess. Checkout master. Hard reset to the commit where you should have branched, which is almost certainly the last commit you pushed.

Create a new well-named, well-scoped branch and gradually implement what you learned in messy-wip. And/or make a series of small, well-scoped commit to master streamlining the circuitous route travelled in messy-wip branch. Once all the good stuff learned done in messy-wip is better represented in master or the new feature branch, delete it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant