Copied to clipboard

Flag this post as spam?

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


  • Nicole Polet 50 posts 202 karma points
    Jul 05, 2016 @ 23:12
    Nicole Polet
    0

    Only deploying certain changes

    Hello,

    I have an Umbraco 7 site, and I am using Git with Sourcetree as version control for it.

    I am new to both Umbraco and Git, so this might be a bit of a noob question.

    We have recently launched our Umbraco site and are now looking to add some new features (specifically a global site search in the header). This may take me a while to develop, but in the meantime we might want to make some small unrelated changes to some of the template files.

    My question is how can I deploy small, unrelated changes to the site without deploying the changes I am making for the search functionality? I feel like this is something that can be done by creating a new branch in Git for the site search development, but I'm not sure how to do this from within Umbraco.

    Any help would be greatly appreciated!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 06, 2016 @ 05:27
    Jan Skovgaard
    1

    Hi Nicole

    This primarily has to do with your branching strategy I'd say since it's a matter of figuring out when you work on a feature or when you're dealing with hotfixes.

    Depending on your setup it might make sense to have a look at this strategy http://nvie.com/posts/a-successful-git-branching-model/ - Basically here the "Master" branch is the one that contains the code, which should be deployed and in the development branch you have the codebase that you create features from and merge features into when they're done and then you merge the development branch into the master branch.

    Source tree has a button called "Git flow", which supports the flow described in the former mentioned post I believe - You can read more about it here https://blog.sourcetreeapp.com/2012/08/01/smart-branching-with-sourcetree-and-git-flow/

    When working in teams this approach might be a very good idea - At one of my former workplaces we used Git flow, which worked pretty well for us - But no organisation is the same so there can be reasons to do things differently.

    If you're the only developer on the project maybe you can use a strategy where you create features from your master branch and make minor fixes directly in the master branch.

    That way you can keep working on the search feature and still be able to deploy minor fixes without deploying something that is not ready for production yet since that part of the code will be in the specific feature branch.

    If the work you do require you to add a new stuff, which requires Database modification you will be able to create those in your local Umbraco instance and then add these to your live environment when you're ready to deploy the feature. You can either do it manully or use something like uSync or perhaps buy a courier license, which makes it easy to sync document types etc. between your local and live environment.

    I hope this makes sense? Otherwise just let me know :)

    /Jan

  • Nicole Polet 50 posts 202 karma points
    Jul 06, 2016 @ 17:21
    Nicole Polet
    0

    Hi Jan, thanks so much for the detailed answer. I do understand what you're saying about branching. We are using Umbraco as a Service and the only thing I'm currently doing locally is editing the JS and CSS. When I create/edit things like macros and templates I just do it right within our Development Site in UaaS. But then when I click "deploy x commits to Live", it deploys everything I've done- so it seems I can't do branching from there.

    If I'm understanding correctly, I think I need to set up a local instance of Umbraco so that I can develop straight from there (and use SourceTree to create a branch that I can merge when I'm ready). Is this right? And if so, how would I go about setting up a local instance of Umbraco? I already have a place locally where I'm pulling down all of the current files from the site, I'm just not sure how to view these local files within the context of Umbraco. I hope that made sense :)

    Thanks again, I really appreciate it!

  • Nicole Polet 50 posts 202 karma points
    Jul 06, 2016 @ 18:03
    Nicole Polet
    0

    Hi again Jan,

    I just found this: https://umbraco.com/follow-us/blog-archive/2016/5/10/uaas-spotlight-working-locally/

    Which I think answers my question!

    I will get set up locally and see how this works for me. Thanks again for your help.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 07, 2016 @ 05:04
    Jan Skovgaard
    1

    Hi Nicole

    Aaah yes totally forgot about the possibility of you running Umbraco as a service - So much have happened in the Umbraco world that it's easy to forget the many possibilities of how Umbraco can be used and how people's setups are before answering their questions - Unfortunately I have not got that much UAAS experience myself yet so I'm not able to give you some nice hints or details about how to go about it yet.

    But if I remember correctly you should be able to decide, which of the Umbraco changes you want to synchronize and in regards to files I guess it should be possible to use a branching strategy as well.

    Happy coding :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft