Video: Create a feature branch and retire only the disposable ref
The video plays in YouTube’s player, in privacy-enhanced mode.
- 3 min video
- English narration · English and Arabic captions
- Watch on YouTube
Add workflow cards on feature/pricing-cards while keeping main unchanged. Rename a throwaway branch and delete it only after proving its commit is already reachable from main.
Read the full lesson
The article has every step and command from the video, the practice exercise and the questions.
Video transcript
The narration of the video, cue by cue.
- Create a feature branch while preserving main.
- A new branch name does not create a commit.
- Create the disposable name without leaving main.
- Confirm that create-only did not switch your branch.
- Rename the disposable ref, not the website's source branch.
- Check the current disposable tip is already reachable from main.
- Delete only the prechecked disposable reference.
- GitTree's protected deletion is not native safe-delete refusal.
- This time, create the feature and check it out.
- Save the workflow section without prices or promotions.
- Review the feature's one changed file before committing.
- Commit on the feature, not on main.
- Only the checked-out branch advances with this commit.
- Switching selects main's committed tree.
- Native safe deletion refuses the unmerged feature.
- That refusal does not prove GitTree will refuse the same deletion.
- Return to the feature's recorded file contents.
- Verify one feature commit and only index dot H T M L changed.
- Main still has five commits and the feature is clean.
- With checkout off, the new name exists but HEAD stays on main.
- Cancel an unexpected dirty switch and inspect the work first.
- A protected local tip is not a promise of remote restoration.
- Keep the useful feature and verify the disposable names are gone.
- The next lesson introduces remotes; none was needed here.