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
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.
The text was updated successfully, but these errors were encountered:
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. Checkoutmaster
. 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 tomaster
streamlining the circuitous route travelled inmessy-wip
branch. Once all the good stuff learned done inmessy-wip
is better represented inmaster
or the new feature branch, delete it.The text was updated successfully, but these errors were encountered: