Best Practices and Q&A
Harry
· 13 Sep 2026
· 1 views
Workflow Best Practices
- Pull before starting edits; commit small units often.
- Use branches for features, then merge back on main.
- Review every diff before committing.
- Stash instead of carrying unfinished changes.
- Keep tags only for releases, never daily work.
Interview Q&A
Q: What is the difference between fetch and pull?
A: Fetch downloads remote branch updates without merging. Pull does the same then performs a merge (or rebase) into your current branch.
Q: How do you recover a stashed change?
A: SourceTree keeps stashes in the left panel; right-click and choose Apply (restores without removing) or Pop (restores and drops the stash entry).
Q: How do you combine one commit from another branch?
A: Use Cherry-pick on that commit. It replays the single change onto your current branch without merging the entire branch.
Q: When should you prefer rebase over merge?
A: Rebase keeps shared-branch history linear, which is tidy for review; merge preserves the true timeline, which matters for audit trails.
Key Points
- Fix workflow habits, not just clicks.
- Fetch-vs-pull and rebase-vs-merge are the key concepts.
- Stash and cherry-pick handle the awkward cases.
- Visual review stays a daily habit.