What’s the most efficient way to create a pull request?
I see other people’s changes in my PR, which shouldn’t be included.
Currently, I do the following:
- Run
git pull main
to update my local repo. - Create a new branch.
- Make changes, commit them, and push the branch to remote.
- Open a pull request.
However, when I do this, I see other people’s changes in my PR, which shouldn’t be included. I tried using git rebase -i HEAD~5
to clean up my commits and then used git push --force-with-lease
but this doesn’t feel like a professional or efficient approach
What could I be doing wrong, and how can I fix this to ensure only my changes are in the PR?
uglyDuck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3