@JackbyDev yes, friend, you too have entirely missed the point.I have my branch displayed in my shell, but mistakes happen. And a pre-commit hook that checks what branch I'm on is an excellent way to avoid those mistakes.I already have a topic branch, likely with a half a dozen odd commits in, which I intended to make my changes in. The hook avoids a mistake made on the one branch I know I pretty much never want to commit to directly.Yes, I could continue making commits to the wrong branch, and then fix my mistake later. That's noooot the point! I want to commit to the right branch in the first place. Yes, I'm going to need to rebase eventually before I push and put up a merge request - also not the point. The point of the topic branch is that all my work in progress commits are there, I can see the history of what I've tried that has and hasn't worked, and then eventually clean it up with a rebase before actual submission.All the work neds to go in the topic branch, always, and it already exists because I opened it as soon as I started work on that ticket.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
replies: