Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dee 23 posts 93 karma points
    Oct 06, 2019 @ 19:30
    Dee
    0

    Deploy local to cloud with Visual Studio vs. gitignored

    Hey guys,

    after setting up my VS environment as described here:

    https://our.umbraco.com/documentation/Umbraco-Cloud/Set-Up/Working-With-Visual-Studio/

    I want now to deploy my local changes including membertypes and so on to the live site. Since I do not have a cloud dev environment, I need to deploy from VS directly to cloud,

    Using the "uaas-cmd" for VS setup, all folders and files within the web project are "gitignored". So if I change things locally, these changes are not raising up for stage/commit or push.

    In the video here

    https://umbraco.tv/videos/umbraco-cloud/getting-started-with-umbraco-cloud/deploying-types-and-files/

    all files are under source control and his changes are showing up for a code commit. I don't think that all folders and files under web project should be added to the source control. There must be a reason for .gitignored.

    I checked also this doc https://our.umbraco.com/documentation/Umbraco-Cloud/Deployment/

    it's using the cloud dev environment.

    I also checked this page which is sadly not updated for Umbraco 8:

    https://our.umbraco.com/Documentation/Getting-Started/Code/Source-Control/index-v7

    Can I rely on the documentation above although it's for Umbraco 7? It also seems that it's not really related to the cloud version of local environments.

    Since I already had some painful starting experiences because of missing updated videos and documentations for Umbraco 8 and using older versions of documentations, I would like make sure, it is the right approach.

    Thanks for your help!

    Dee

  • Søren Kottal 441 posts 2735 karma points MVP c-trib
    Oct 07, 2019 @ 06:34
    Søren Kottal
    0

    Hi Dee

    The uaas-cmd setup gives you two local git repositories, the root repository which is containing your source files, and buried (and ignored) inside of that is your web repository, which contains the files that are being committed/pushed for deployment.

    It is described in this section: https://our.umbraco.com/documentation/Umbraco-Cloud/Set-Up/Working-With-Visual-Studio/#git---what-should-be-committed

  • Dee 23 posts 93 karma points
    Oct 07, 2019 @ 09:16
    Dee
    0

    Hi Soren,

    thanks for your reply.

    I already read that documentation. There stands following:

    The cloned git repository from Umbraco Cloud comes with its own .gitignore so files that should NOT be committed are already handled.

    All my files within the web project are gitignored by default when I use the uaas-cmd.

    It seems to me that these are contradictory statesments. On the one hand these gitignored files

    should NOT be committed

    , on the other hand, how could I deploy otherwise my backoffice changes to the live environment?

    Thanks Dee

  • Søren Kottal 441 posts 2735 karma points MVP c-trib
    Oct 07, 2019 @ 09:38
    Søren Kottal
    1

    Hi Dee

    If you look on your disk, you have a folder structure like the following.

    • MyProject
      • MyProject.Core
      • MyProject.Web

    Both MyProject and MyProject.Web is git repositories. MyProject is your source repository which ignores MyProject.Web. MyProject.Web is the deployment repository.

    If you cd into that, and run git status you should be able to see your changes.

  • Dee 23 posts 93 karma points
    Oct 07, 2019 @ 10:03
    Dee
    0

    Hi Soren,

    so it means, ignored files within the web project are being ignored to be pushed to the core repository? that would make sense...

    I wonder if VS can managed both repositories... or do i need another git client

    Dee

  • Søren Kottal 441 posts 2735 karma points MVP c-trib
    Oct 07, 2019 @ 10:06
    Søren Kottal
    0

    I'm pretty sure VS can't manage both, so you'll need another git client :)

  • Dee 23 posts 93 karma points
    Oct 07, 2019 @ 10:07
    Dee
    0

    thanks for your help :) Now i see things clear...

  • Dee 23 posts 93 karma points
    Oct 07, 2019 @ 10:10
Please Sign in or register to post replies

Write your reply to:

Draft