I have two git branches I'm working on, let's call one problem-fix
and the other problem-fix-dev
. The dev branch is connected to a personal remote pipeline I'm working on, so I've been including all sorts of debugging and logging statements for testing purposes. Now that I've finished my fix, I want to merge it into problem-fix
, but obviously don't want to include the various printing and logging code.
I could go through the code and just delete all the undesirable lines, but that would be very tedious. And it won't be as simple as deleting all lines that begin with print
for various reasons. Additionally, I can't just git rebase
and selectively drop commits, since many of the commits I've made have both undesirable printing lines as well as important fix code.
So my question is: is there a way to force git to show differences between branches in editor, ideally with the merge conflict syntax? While I'm sure there are no actual existing conflicts, my life would be made a lot easier if each change was highlighted in the editor line by line.
Alternatively, I'm using VSCode. So if there is a nifty extension or plugin that can accomplish the same thing, that would be fine.
Thanks
This is what you could do:
git reset head~4
)