Merge parts of branch UI-Enhancement
Resolve conflicts between branches UI-Enhancement and main (solve conflicts one by one for single commits):
Cherry-Pick Individual Commits
Instead of merging the entire branch, use cherry-picking to select specific commits:
git checkout main
git pull origin main # Make sure main is up to date
git checkout -b selective-ui-enhancements
git log --oneline UI-enhancement # List commits from UI-enhancement branch
# Or view commits not in main:
git log --oneline main..UI-enhancement
# The -n flag is crucial - it stages the changes without committing, allowing you to manually edit what gets included.
git cherry-pick -n <commit-hash>
git status # See which files have conflicts
git add <resolved-files> # Stage the resolved files
git status # See what's staged
# Edit files in VS Code to remove unwanted changes
git add . # Stage your selective changes
git commit -m "Cherry-pick: Add selected UI enhancements from commit <hash>"