mmikhan: I fetched the upstream branch first, git fetch upstream and then merged, git merge upstream/main --allow-unrelated-histories. It had some conflicts that I resolved and merged eventually but that brought all the upstream commit history. all I wanted was the last commit instead of pulling the entire upstream commit history. how could have I done better?
GitHub Copilot: You're right! Merging with --allow-unrelated-histories pulled in the entire upstream commit history, which is often not what you want. Here are better approaches:
git fetch upstream
git cherry-pick <commit-hash>This applies only the specific commit you want without bringing the entire history.