I have a master
/develop
branching system that i have come to love, but it comes with a basic rule. No commits are done on develop
or master
, only merges. This is great, but recently i accidentally made some changes/commits on my develop branch and it annoys the tar out of me.
I looked into moving the ownership of those commits from develop
into another already existing branch (We'll call it work
), the one i should have been working on in the first place, but i decided to just let this one go. Instead, i'd like to fix the issue to begin with.. How does one go about locking a branch, so that commit simply doesn't work on it for traditional, normal changes?
Eg, if you made changes on a "locked" branch, you couldn't git add
nor could you git commit -a
. I suppose technically i'm asking to lock staging, but you get the idea. Any thoughts on this? Or would i simply be better off learning git well enough that i know how to fix commit parent issues?