next|prev
5. How I do
- Create a branch with a descriptive name, rather than stashing
- Create a draft for the pull request message
- Create an initial commit that describes the intended feature
- Amend that commit incrementally: git commit --amend --date=now
- Also update commit and PR messages
Consequences:
- git status always reports a clean working copy
- It's possible to switch to something else at any time
- If something else needs to be changed, it becomes easy to:
- Record it in a distinct commit
- Reorder commits to bring the main one to the branch tip:
git rebase -i
Benefits:
- The history remains accurate
- The mind remains free