Setting up mutiple repos in VS? (UmbCloud repo and...
# help-with-other
m
I have gotten my UmbCloud setup and cloned locally but now need to get a source control repo setup. The umb docs talk about how this is best practice to do but not how to do it and I do need a sepyrepo i can check in code but cause a push to production. I have been looking on line for a bit and cantyfind anything beyond aetting up a repo per project in a solution. How are we supposed to setup a separate source control for umb cloud? I am on VS2022.
u
Hey I just got started with umbraco cloud too. I don't know if it the best practice way of doing it but i did a setup with a repository in github that mirrors the one i have in umbraco cloud. I did the initial setup by following this guide https://docs.github.com/en/repositories/creating-and-managing-repositories/duplicating-a-repository#mirroring-a-repository-in-another-location and then i built a cronjob that goes into my mirrored repository and runs:
Copy code
git fetch -p origin
git push --mirror
once a week Thinking about building a github action that does it daily instead but for now it's a workable solution
m
u
Very nice 👍 will look into this
m
Those talk about a cd/cinsetup from git to cloud. I was hopping not to have to through all that hassle. I am just lookin gto have git a code repository to help me move code between my desktop and laptop so I can pickup where I left off as i go around. Then once I am done push it out to cloud repository all right i. Visual Studio with a few clicks.
j
You don't have to have a seperate repository, if you have simple requirements it is perfectly fine to only use the Umbraco Cloud ones. If you want to store testing code you can just push branches to Cloud which will not count as a deployment unless it is the master branch
m
https://docs.umbraco.com/umbraco-cloud/getting-started/git-repository-in-a-cloud-project#a-source-control-repository-with-your-own-code According to that doc you should not be using the cloud git to store development branches and they say they dont garentee anything but mast and other branches can be removed without notice.
j
Wow ok, that is news to me 😅 We are currently running a separate repo as well, and then have written a quick git alias that will sync our repo's main branch onto the cloud repos master branch
m
I know basically 0% of git so i don't even know what you just said means. I am just trying to figure a way to sync code between desktop and laptop so when I am on lunch at work I can knock out a bit of work on my project. I am thinking I am just going to go old school and have everything live on a usb stick.