We are using Sourcetree on a test PC to pull down our latest changes to a system and test them. We only ever pull via Sourcetree on this box.
Works fine but the Commit button indicates "11" and it's worrying that one of us could accidentally commit whatever those changes are. It would be ideal if we could just take the commit button out completely on that computer. Is that possible?
Thanks
Hi @Darrenj ,
I think you won't be able to configure that in Sourcetree. I've tried checking open suggestions, but couldn't find anything related.
*note that you could open a new suggestion by yourself and then share the link here
I guess some alternatives would be:
All options wouldn't hide the button, but would prevent from doing any commits from that particular device/machine.
Cheers,
Tobi
Hi Tobi,
We can't make the repo read-only because we do commit to it from other machines.
How would we action either of the other options?
We are using BitBucket, if that affects the answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Darrenj ,
I guess you could navigate to repo settings in Bitbucket > Branch restrictions and add a branch restriction for the relevant branch or pattern.
Additionally, under Write access, you can remove all users/groups except those who should be able to commit directly. This would block direct commits/pushes from the test PC, but still allow other machines/users with permissions. This kind of depends on how authorization is configured on that test PC.
As for disabling commits at the git config level, maybe something like this would work (please do test it out before!):
git config alias.commit "!echo 'Committing is disabled on this machine.' && false"
I'd say the recommended way would be to remove commit rights in the remote > meaning you'll have to 'play' around with permissions and see how everything is configured on this test PC you have.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.