How do Salesforce Developers using Visual Studio Code use Github?

Sci-fi novel: ark ship from Earth is sent into space to another planet, one man woken early from cryosleep paints a giant mural

Is this a bug in plotting step functions?

Is it possible to fly backward if you have really strong headwind?

Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?

Is it possible for a vehicle to be manufactured without a catalytic converter?

How to learn Linux system internals

Can a human be transformed into a Mind Flayer?

Separate SPI data

A word that means "blending into a community too much"

Has there been a multiethnic Star Trek character?

New bike, tubeless tire will not inflate

What does a topology do, and what makes a particular topology the 'right' one?

Why are MBA programs closing in the United States?

Which is the better way to call a method that is only available to one class that implements an interface but not the other one?

Who won a Game of Bar Dice?

Why does this query, missing a FROM clause, not error out?

Origin of "boor"

Is there a set of positive integers of density 1 which contains no infinite arithmetic progression?

How to “listen” to existing circuit

I have a problematic assistant manager, but I can't fire him

Are polynomials with the same roots identical?

How can one's career as a reviewer be ended?

First sign that you should look for another job?

Advantages of the Exponential Family: why should we study it and use it?



How do Salesforce Developers using Visual Studio Code use Github?







.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I have been a solo developer for quite a while and am now working with another individual. I am making the difficult switch from Mavens Mate with Eclipse to Visual Studio Code. I am not sure what the best way is to pair program, but I believe Github to be the answer. How can we get our production orgs code into the Github and then have that deploy to our main production read sandbox that we share?










share|improve this question




























    3















    I have been a solo developer for quite a while and am now working with another individual. I am making the difficult switch from Mavens Mate with Eclipse to Visual Studio Code. I am not sure what the best way is to pair program, but I believe Github to be the answer. How can we get our production orgs code into the Github and then have that deploy to our main production read sandbox that we share?










    share|improve this question
























      3












      3








      3








      I have been a solo developer for quite a while and am now working with another individual. I am making the difficult switch from Mavens Mate with Eclipse to Visual Studio Code. I am not sure what the best way is to pair program, but I believe Github to be the answer. How can we get our production orgs code into the Github and then have that deploy to our main production read sandbox that we share?










      share|improve this question














      I have been a solo developer for quite a while and am now working with another individual. I am making the difficult switch from Mavens Mate with Eclipse to Visual Studio Code. I am not sure what the best way is to pair program, but I believe Github to be the answer. How can we get our production orgs code into the Github and then have that deploy to our main production read sandbox that we share?







      apex github






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 2 at 3:35









      Matthew MetrosMatthew Metros

      1257




      1257




















          1 Answer
          1






          active

          oldest

          votes


















          4














          This is going to be a pretty quick summary of a very broad area. I am happy to focus this answer more finely on a specific area if you'd like to push me in one direction or another



          Source Model



          It sounds like you are already practicing source-oriented development using the Org Development Model (cf. also Trailhead). If you're all set up there, that's great. If not, and you still need to retrieve some customizations, you'll need to develop a package.xml file and pull the source down from your production org.



          Eclipse and MavensMate can actually make this initial step pretty easy, if you want to use those tools before you put them aside for VS Code. Just subscribe to the metadata you want from Production and refresh the project to snapshot your metadata. Then, you have a source tree ready to swap over the Visual Studio Code.



          Starting with Git



          Adding GitHub is a natural extension of a source-based development process, and is especially critical when using a shared, persistent sandbox for development. In a shared context like that, it's very easy to inadvertently overwrite one another's customizations, as well as to pull down to one's source tree breaking changes or overwrites made by the other developer. Using Git makes sure that you can track the version history of your code and helps prevent loss.



          Since you're already in a situation where you have your source code stored offline, adding Git and GitHub is pretty straightforward. Create a repository on GitHub and add both developers as collaborators. In your local project, where you have your source code, create a local repository and commit your source code to it. (You'll want to add a .gitignore file to ensure that build artifacts and tracking files, like .sfdx, aren't committed - steal one from an existing Salesforce open source project!)



          (Note that you can do these steps from the command line, which is my preference, or from Visual Studio Code's Git interface, or from GitHub Desktop).



          Then, follow the instructions on your GitHub repository page to add that repo as a remote to your local copy, and use git push to sync your work to the GitHub server.



          Working with Git Flow



          You and your colleague will have to get used to working in some flavor of Git Flow. (See Trailhead). Because you'll be moving your source of truth to your source code, it's critical to always make sure you've pulled changes from the server (git pull) before you start writing and committing work, and keeping track of the state of the Salesforce server (sfdx force:source:deploy and sfdx force:source:retrieve - preferably a lot more of the former, since your local source tree will be your source of truth).



          It's very easy to be tempted into working primarily in the org, and pulling to local only to make commits to Git. I encourage resisting this tendency: work locally first, then push and test. This helps ensure that you focus on your source code as source of truth and helps protect you against interference in the development process due to changes in your shared resource, the persistent sandbox.



          Commit early and commit often - as soon as you have an increment of work that compiles, is my philosophy. Always pull from the server to merge in your colleague's changes. Read up on branching models used by successful Salesforce projects, and consider using feature branches to keep larger units of work separated.



          Next Step: Scratch Orgs



          Scratch orgs are the next step in source-based development and provide you and your colleagues with individualized, disposable Salesforce environments. When you get to the point where you're fully comfortable working local-first in source format, you may be ready to start experimenting with pushing your code and metadata into scratch orgs.



          Note that to take this step you really need to be version controlling everything. That means Apex and Visualforce, but also your entire data model, declarative automation, and possibly even permissions (Profiles are the trickiest thing to handle in source format, but it's not impossible). You'll generate fresh scratch orgs that look like production by pushing this source into them, do development there, commit it to Git, and then throw away the org.



          There are lots of great resources on Trailhead and elsewhere on adopting the scratch org model.






          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "459"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f264450%2fhow-do-salesforce-developers-using-visual-studio-code-use-github%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            This is going to be a pretty quick summary of a very broad area. I am happy to focus this answer more finely on a specific area if you'd like to push me in one direction or another



            Source Model



            It sounds like you are already practicing source-oriented development using the Org Development Model (cf. also Trailhead). If you're all set up there, that's great. If not, and you still need to retrieve some customizations, you'll need to develop a package.xml file and pull the source down from your production org.



            Eclipse and MavensMate can actually make this initial step pretty easy, if you want to use those tools before you put them aside for VS Code. Just subscribe to the metadata you want from Production and refresh the project to snapshot your metadata. Then, you have a source tree ready to swap over the Visual Studio Code.



            Starting with Git



            Adding GitHub is a natural extension of a source-based development process, and is especially critical when using a shared, persistent sandbox for development. In a shared context like that, it's very easy to inadvertently overwrite one another's customizations, as well as to pull down to one's source tree breaking changes or overwrites made by the other developer. Using Git makes sure that you can track the version history of your code and helps prevent loss.



            Since you're already in a situation where you have your source code stored offline, adding Git and GitHub is pretty straightforward. Create a repository on GitHub and add both developers as collaborators. In your local project, where you have your source code, create a local repository and commit your source code to it. (You'll want to add a .gitignore file to ensure that build artifacts and tracking files, like .sfdx, aren't committed - steal one from an existing Salesforce open source project!)



            (Note that you can do these steps from the command line, which is my preference, or from Visual Studio Code's Git interface, or from GitHub Desktop).



            Then, follow the instructions on your GitHub repository page to add that repo as a remote to your local copy, and use git push to sync your work to the GitHub server.



            Working with Git Flow



            You and your colleague will have to get used to working in some flavor of Git Flow. (See Trailhead). Because you'll be moving your source of truth to your source code, it's critical to always make sure you've pulled changes from the server (git pull) before you start writing and committing work, and keeping track of the state of the Salesforce server (sfdx force:source:deploy and sfdx force:source:retrieve - preferably a lot more of the former, since your local source tree will be your source of truth).



            It's very easy to be tempted into working primarily in the org, and pulling to local only to make commits to Git. I encourage resisting this tendency: work locally first, then push and test. This helps ensure that you focus on your source code as source of truth and helps protect you against interference in the development process due to changes in your shared resource, the persistent sandbox.



            Commit early and commit often - as soon as you have an increment of work that compiles, is my philosophy. Always pull from the server to merge in your colleague's changes. Read up on branching models used by successful Salesforce projects, and consider using feature branches to keep larger units of work separated.



            Next Step: Scratch Orgs



            Scratch orgs are the next step in source-based development and provide you and your colleagues with individualized, disposable Salesforce environments. When you get to the point where you're fully comfortable working local-first in source format, you may be ready to start experimenting with pushing your code and metadata into scratch orgs.



            Note that to take this step you really need to be version controlling everything. That means Apex and Visualforce, but also your entire data model, declarative automation, and possibly even permissions (Profiles are the trickiest thing to handle in source format, but it's not impossible). You'll generate fresh scratch orgs that look like production by pushing this source into them, do development there, commit it to Git, and then throw away the org.



            There are lots of great resources on Trailhead and elsewhere on adopting the scratch org model.






            share|improve this answer



























              4














              This is going to be a pretty quick summary of a very broad area. I am happy to focus this answer more finely on a specific area if you'd like to push me in one direction or another



              Source Model



              It sounds like you are already practicing source-oriented development using the Org Development Model (cf. also Trailhead). If you're all set up there, that's great. If not, and you still need to retrieve some customizations, you'll need to develop a package.xml file and pull the source down from your production org.



              Eclipse and MavensMate can actually make this initial step pretty easy, if you want to use those tools before you put them aside for VS Code. Just subscribe to the metadata you want from Production and refresh the project to snapshot your metadata. Then, you have a source tree ready to swap over the Visual Studio Code.



              Starting with Git



              Adding GitHub is a natural extension of a source-based development process, and is especially critical when using a shared, persistent sandbox for development. In a shared context like that, it's very easy to inadvertently overwrite one another's customizations, as well as to pull down to one's source tree breaking changes or overwrites made by the other developer. Using Git makes sure that you can track the version history of your code and helps prevent loss.



              Since you're already in a situation where you have your source code stored offline, adding Git and GitHub is pretty straightforward. Create a repository on GitHub and add both developers as collaborators. In your local project, where you have your source code, create a local repository and commit your source code to it. (You'll want to add a .gitignore file to ensure that build artifacts and tracking files, like .sfdx, aren't committed - steal one from an existing Salesforce open source project!)



              (Note that you can do these steps from the command line, which is my preference, or from Visual Studio Code's Git interface, or from GitHub Desktop).



              Then, follow the instructions on your GitHub repository page to add that repo as a remote to your local copy, and use git push to sync your work to the GitHub server.



              Working with Git Flow



              You and your colleague will have to get used to working in some flavor of Git Flow. (See Trailhead). Because you'll be moving your source of truth to your source code, it's critical to always make sure you've pulled changes from the server (git pull) before you start writing and committing work, and keeping track of the state of the Salesforce server (sfdx force:source:deploy and sfdx force:source:retrieve - preferably a lot more of the former, since your local source tree will be your source of truth).



              It's very easy to be tempted into working primarily in the org, and pulling to local only to make commits to Git. I encourage resisting this tendency: work locally first, then push and test. This helps ensure that you focus on your source code as source of truth and helps protect you against interference in the development process due to changes in your shared resource, the persistent sandbox.



              Commit early and commit often - as soon as you have an increment of work that compiles, is my philosophy. Always pull from the server to merge in your colleague's changes. Read up on branching models used by successful Salesforce projects, and consider using feature branches to keep larger units of work separated.



              Next Step: Scratch Orgs



              Scratch orgs are the next step in source-based development and provide you and your colleagues with individualized, disposable Salesforce environments. When you get to the point where you're fully comfortable working local-first in source format, you may be ready to start experimenting with pushing your code and metadata into scratch orgs.



              Note that to take this step you really need to be version controlling everything. That means Apex and Visualforce, but also your entire data model, declarative automation, and possibly even permissions (Profiles are the trickiest thing to handle in source format, but it's not impossible). You'll generate fresh scratch orgs that look like production by pushing this source into them, do development there, commit it to Git, and then throw away the org.



              There are lots of great resources on Trailhead and elsewhere on adopting the scratch org model.






              share|improve this answer

























                4












                4








                4







                This is going to be a pretty quick summary of a very broad area. I am happy to focus this answer more finely on a specific area if you'd like to push me in one direction or another



                Source Model



                It sounds like you are already practicing source-oriented development using the Org Development Model (cf. also Trailhead). If you're all set up there, that's great. If not, and you still need to retrieve some customizations, you'll need to develop a package.xml file and pull the source down from your production org.



                Eclipse and MavensMate can actually make this initial step pretty easy, if you want to use those tools before you put them aside for VS Code. Just subscribe to the metadata you want from Production and refresh the project to snapshot your metadata. Then, you have a source tree ready to swap over the Visual Studio Code.



                Starting with Git



                Adding GitHub is a natural extension of a source-based development process, and is especially critical when using a shared, persistent sandbox for development. In a shared context like that, it's very easy to inadvertently overwrite one another's customizations, as well as to pull down to one's source tree breaking changes or overwrites made by the other developer. Using Git makes sure that you can track the version history of your code and helps prevent loss.



                Since you're already in a situation where you have your source code stored offline, adding Git and GitHub is pretty straightforward. Create a repository on GitHub and add both developers as collaborators. In your local project, where you have your source code, create a local repository and commit your source code to it. (You'll want to add a .gitignore file to ensure that build artifacts and tracking files, like .sfdx, aren't committed - steal one from an existing Salesforce open source project!)



                (Note that you can do these steps from the command line, which is my preference, or from Visual Studio Code's Git interface, or from GitHub Desktop).



                Then, follow the instructions on your GitHub repository page to add that repo as a remote to your local copy, and use git push to sync your work to the GitHub server.



                Working with Git Flow



                You and your colleague will have to get used to working in some flavor of Git Flow. (See Trailhead). Because you'll be moving your source of truth to your source code, it's critical to always make sure you've pulled changes from the server (git pull) before you start writing and committing work, and keeping track of the state of the Salesforce server (sfdx force:source:deploy and sfdx force:source:retrieve - preferably a lot more of the former, since your local source tree will be your source of truth).



                It's very easy to be tempted into working primarily in the org, and pulling to local only to make commits to Git. I encourage resisting this tendency: work locally first, then push and test. This helps ensure that you focus on your source code as source of truth and helps protect you against interference in the development process due to changes in your shared resource, the persistent sandbox.



                Commit early and commit often - as soon as you have an increment of work that compiles, is my philosophy. Always pull from the server to merge in your colleague's changes. Read up on branching models used by successful Salesforce projects, and consider using feature branches to keep larger units of work separated.



                Next Step: Scratch Orgs



                Scratch orgs are the next step in source-based development and provide you and your colleagues with individualized, disposable Salesforce environments. When you get to the point where you're fully comfortable working local-first in source format, you may be ready to start experimenting with pushing your code and metadata into scratch orgs.



                Note that to take this step you really need to be version controlling everything. That means Apex and Visualforce, but also your entire data model, declarative automation, and possibly even permissions (Profiles are the trickiest thing to handle in source format, but it's not impossible). You'll generate fresh scratch orgs that look like production by pushing this source into them, do development there, commit it to Git, and then throw away the org.



                There are lots of great resources on Trailhead and elsewhere on adopting the scratch org model.






                share|improve this answer













                This is going to be a pretty quick summary of a very broad area. I am happy to focus this answer more finely on a specific area if you'd like to push me in one direction or another



                Source Model



                It sounds like you are already practicing source-oriented development using the Org Development Model (cf. also Trailhead). If you're all set up there, that's great. If not, and you still need to retrieve some customizations, you'll need to develop a package.xml file and pull the source down from your production org.



                Eclipse and MavensMate can actually make this initial step pretty easy, if you want to use those tools before you put them aside for VS Code. Just subscribe to the metadata you want from Production and refresh the project to snapshot your metadata. Then, you have a source tree ready to swap over the Visual Studio Code.



                Starting with Git



                Adding GitHub is a natural extension of a source-based development process, and is especially critical when using a shared, persistent sandbox for development. In a shared context like that, it's very easy to inadvertently overwrite one another's customizations, as well as to pull down to one's source tree breaking changes or overwrites made by the other developer. Using Git makes sure that you can track the version history of your code and helps prevent loss.



                Since you're already in a situation where you have your source code stored offline, adding Git and GitHub is pretty straightforward. Create a repository on GitHub and add both developers as collaborators. In your local project, where you have your source code, create a local repository and commit your source code to it. (You'll want to add a .gitignore file to ensure that build artifacts and tracking files, like .sfdx, aren't committed - steal one from an existing Salesforce open source project!)



                (Note that you can do these steps from the command line, which is my preference, or from Visual Studio Code's Git interface, or from GitHub Desktop).



                Then, follow the instructions on your GitHub repository page to add that repo as a remote to your local copy, and use git push to sync your work to the GitHub server.



                Working with Git Flow



                You and your colleague will have to get used to working in some flavor of Git Flow. (See Trailhead). Because you'll be moving your source of truth to your source code, it's critical to always make sure you've pulled changes from the server (git pull) before you start writing and committing work, and keeping track of the state of the Salesforce server (sfdx force:source:deploy and sfdx force:source:retrieve - preferably a lot more of the former, since your local source tree will be your source of truth).



                It's very easy to be tempted into working primarily in the org, and pulling to local only to make commits to Git. I encourage resisting this tendency: work locally first, then push and test. This helps ensure that you focus on your source code as source of truth and helps protect you against interference in the development process due to changes in your shared resource, the persistent sandbox.



                Commit early and commit often - as soon as you have an increment of work that compiles, is my philosophy. Always pull from the server to merge in your colleague's changes. Read up on branching models used by successful Salesforce projects, and consider using feature branches to keep larger units of work separated.



                Next Step: Scratch Orgs



                Scratch orgs are the next step in source-based development and provide you and your colleagues with individualized, disposable Salesforce environments. When you get to the point where you're fully comfortable working local-first in source format, you may be ready to start experimenting with pushing your code and metadata into scratch orgs.



                Note that to take this step you really need to be version controlling everything. That means Apex and Visualforce, but also your entire data model, declarative automation, and possibly even permissions (Profiles are the trickiest thing to handle in source format, but it's not impossible). You'll generate fresh scratch orgs that look like production by pushing this source into them, do development there, commit it to Git, and then throw away the org.



                There are lots of great resources on Trailhead and elsewhere on adopting the scratch org model.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 2 at 13:33









                David ReedDavid Reed

                44.1k82564




                44.1k82564



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Salesforce Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f264450%2fhow-do-salesforce-developers-using-visual-studio-code-use-github%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?