Branches in git can be very useful, but you need to be careful with them.
I have been using another branch away from out main branch. It has worked well because we are working on a major update and doing what we need to there.
The problem is that I did some work that is not related to that update in that branch. I made 2 new useful commits in the branch instead of main.
I was digging around trying to find ways to move the commits over. Rebasing and merging are a no-go because the project itself isn’t ready.
I found Cherry-picking, I have done this before and was planning on doing it again. Why not?
I will just move the 2 commits over no problem!
But, what about when we need to rebase the whole branch unto our main one …
That means that we will move over the 2 commits again a long with everything else?
This could cause problems.
Well, this is a lesson learned.
Only work on the same project for a particular branch, and stay on main as much as possible. because it might be a while before I get to move those commits over.
Best,
Merl