Git merge vs rebase, diff, patch, stash

This week I have had a bit of a struggle with git when trying to develop a change and I was getting constant conflicts when trying to get my branch up to date with main. A refresh for merge vs rebase. When I first started with git, the environment was pro rebase. But after that job, all places were pro merge. Somehow I visualize better a rebase. I will start using rebase to see if I really understand. That’s how I finally managed to push my change into master. I had a diff generated by my gitlab PR and applied it into master. Something I already commented about but hardly used. Never used it but I was reading about this week as I thought was my only way out from the merge conflict nightmare I was in.