Setting up source control with Bitbucket
jornvango
Posts: 16 New member
We have an Atlassian Bitbucket (Git) server in our company network. We are looking at implementing a source control solution for SSMS (shared environment where we all work on 2 central servers and databases). After installing RedGate Source Control, I attempt to link our test database to source control. However, when I click 'Git', it asks for the 'folder'. No matter what (empty) folder on my local hard drive I select, the software says that "this is not a Git folder".
However, how do I configure the software to connect to the Bitbucket server to create and store the remote repo?
Where do I specify which folder on my local hard drive will act as the local repo?
However, how do I configure the software to connect to the Bitbucket server to create and store the remote repo?
Where do I specify which folder on my local hard drive will act as the local repo?
Tagged:
Answers
After the remote has been cloned locally you can then link the database to it using SQL Source Control and create a DB folder inside it.
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
If this is the case, is this an expected upgrade in the future? We are evaluating source control software for SSMS. Having to use additional 3rd party software to keep everyone's local repo synced to the online repo (=Bitbucket server in our AD domain) sounds like an unneeded headache as competitors (such as ApexSQL) have this integrated in their product.
Thanks!
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Does the default Git connection method support Bitbucket?
You can do both in SSMS when using SQL Source Control's default Git method (the one you use when selecting Git when linking the DB).
Yes, the default Git connection method should work with Bitbucket.
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Now you're saying that once that is done, Redgate can handle the push/pull from SSMS to both the local and remote repo?
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
SQL Source Control will automatically use the config that was put in place when you setup the clone.
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
This short video demonstrates how this works: https://www.youtube.com/watch?v=Pv13GpjGVmY&index=1&list=PLhFdCK734P8ABTs84EAK_x5viEAIV1l3W
(please note that video demonstrates a previous version so there are some minor differences, mostly cosmetic)
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
1. I'm setting up a test database in SSMS so there is no remote repo of it yet. Does the same apply: I commit to a (blank) local repo and then will have to use a 3rd party tool once to push to Bitbucket after which Redgate will handle the future commits/pushes from within SSMS?
2. When I select "Git" in Redgate and select a blank folder on my hard drive, it says "That folder isn't in a Git repository". How do I create one since I have no online repo to clone?
3. When I select "Git" in Redgate, it only allows me to select "Dedicated database". However, we all work on a shared/central SQL server so I need to be able to select "Shared database". Does this "database" apply to the actual SQL server database or the local repo?
2 - You can use the git-init command for this.
3- Shared and Dedicated refers to the live development database(s).
Based on your post it looks like your team is using the shared model.
The default git method in SQL Source Control only supports the Dedicated model , we don't recommend using the shared model with git, but if you really want to use it, you can connect using an alternate method: the Custom setup , however this method provides lesser functionality than the default method: you will not be able to Push/Pull or see revision history in SSMS.
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
1. Why don't you recommend git with the shared model? Is there something inherently troublesome with Git regarding the shared model?
2. Can you recommend an alternative to git that will allow us to use the shared model? We don't have to use Bitbucket. We are open to looking at a solution that will allow us to use it in the best possible manner. E.g. TFS?
'git' is not recognized as an internal or external command,
I reinstalled Source tree but I am not sure where to go from here. Thoughts?
HTH
I had to export into Word, so apologies for the horrid looking presentation
HTH