I'm not good at git yet. I want to ask you, how the rebase with remote repo should be made.
I mean, I have main branch (remote) and I also have branch eg. my_branch (local). When PR for merging my_branch to main was open, there was few more commits added to main that causes conflicts on my_branch.
So, I always:
- update main branch
- checkout my_branch
- rebase my_branch with main
- resolve conflicts
- pull changes
- commit
- push to remote main
But, it creates in the PR weird commit history and also adding these to my PR. I don't want it. I would like to rebase my_branch with main, push it to the remote repo and won't see these commits that was added to main when my PR was open for a while.
How can I change it? I know that there is a way, but I don't understand it correctly. Anyone can explain?
Thanks in advance.