I’m confused how this even happens. You switch to dev and then choose to keep working on your ticket, but your previous work isn’t there, so how do you keep progressing? I can see this as an edge case, but it happens to you often enough that a pre commit hook is useful to stop it?
To be clear, I don’t care what you do, if it works, it works, I just am having a difficult time understanding how this particular scenario happened enough that a pre commit hook was the best way to solve it.
@JackbyDev well, it doesn’t happen very frequently, it’s more of a nice-to have.
It’s more of an issue because our product has a lot of totally separate sections, as well as a separate companion app. It’s easy enough to work on an issue without ever touching code affected by another, and for whatever reason have two or three issues in progress, each in their own branch.
Say, some task you’re blocked on, in the meantime some minor issue from five years ago that nobody really cares about that much but would be nice, and then some other unrelated cleanup task as well.
But, even when I used to work at a place where there was only one single-purpose app, I still worked in topic branches and never ever wanted to actually commit to main (through the mistake was less likely to happen, I grant).
I’m confused how this even happens. You switch to dev and then choose to keep working on your ticket, but your previous work isn’t there, so how do you keep progressing? I can see this as an edge case, but it happens to you often enough that a pre commit hook is useful to stop it?
To be clear, I don’t care what you do, if it works, it works, I just am having a difficult time understanding how this particular scenario happened enough that a pre commit hook was the best way to solve it.
@JackbyDev well, it doesn’t happen very frequently, it’s more of a nice-to have.
It’s more of an issue because our product has a lot of totally separate sections, as well as a separate companion app. It’s easy enough to work on an issue without ever touching code affected by another, and for whatever reason have two or three issues in progress, each in their own branch.
Say, some task you’re blocked on, in the meantime some minor issue from five years ago that nobody really cares about that much but would be nice, and then some other unrelated cleanup task as well.
But, even when I used to work at a place where there was only one single-purpose app, I still worked in topic branches and never ever wanted to actually commit to main (through the mistake was less likely to happen, I grant).