I have two branches, newfeature and release. I work with a team so I need to pull from release every so often to get updates. To do this, I run a git pull origin release from my local newfeature branch. From here I resolve merge conflicts in VSCode by choosing either current or incoming changes. This is using the rebase process.
Upon finishing this process I run a git push origin newfeature. When I do this it says I need to pull the latest since there are conflicts. I run a git pull origin newfeature to get the latest and resolve conflicts. When I finish up the rebase , I finally am able to push to origin/newfeature to make sure it's up to date.
To double check that both branches are compatible, I run another git pull origin release to make sure all conflicts are resolved. Unfortunately, it says that there are conflicts and I have to repeate the process again. To avoid this issue, I've been pulling release and using git push origin newfeature --force to make sure it's up to date. I've read that using --force is not recommended since git is trying to tell me that there are conflicts.
My question is, how do I get out of this rebase loop?
git fetchinstead ofgit pull origin release. This allows you to view the changes on the remote branch before trying to merge.git pull origin releasedoes NOT rebase.git pullis an alias forgit fetchand thengit merge. If you resolve conflicts at the time ofgit pull, then do agit rebase, you will have to resolve those conflicts again. What are the full series of commands you use? Are you doinggit pullfollowed bygit rebase?git pullhint: Resolve all conflicts manually, mark them as resolved with hint: "git add/rm <conflicted_files>", then run "git rebase --continue". hint: You can instead skip this commit: run "git rebase --skip". hint: To abort and get back to the state before "git rebase", run "git rebase --abort".git pullcommand to work differently than the default so that it rebases automatically instead of merging. Personally, I'm not a fan of this. I prefer doinggit fetchandgit rebaseseparately. In fact, I've read recommendations to avoidgit pullentirely and usegit fetchinstead. Then you can deliberately choosegit mergeorgit rebaseyourself.