Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Git Your Web Reference

Git Your Web Reference

Scheduled Pinned Locked Moved The Lounge
csharpwcfcollaborationjsonquestion
15 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T TNCaver

    I don't know what the "yours/theirs" thing is. Can you explain?

    If you think 'goto' is evil, try writing an Assembly program without JMP.

    F Offline
    F Offline
    F ES Sitecore
    wrote on last edited by
    #6

    Most git clients allow you to resolve conflicts by either replacing the remote copy with your local one (resolve using yours) or to ignore your local copy and use the remote copy (resolve using theirs).

    T 1 Reply Last reply
    0
    • F F ES Sitecore

      Most git clients allow you to resolve conflicts by either replacing the remote copy with your local one (resolve using yours) or to ignore your local copy and use the remote copy (resolve using theirs).

      T Offline
      T Offline
      TNCaver
      wrote on last edited by
      #7

      I'll look into this. I use the Git bash shell, and when the Git configuration references to WinMerge don't disappear, WinMerge.

      If you think 'goto' is evil, try writing an Assembly program without JMP.

      1 Reply Last reply
      0
      • T TNCaver

        We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?

        If you think 'goto' is evil, try writing an Assembly program without JMP.

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #8

        TNCaver wrote:

        they have both sandbox and production environments, and the WSDL for each are different.

        Sounds like a poor design. The WSDL should be the same for both; you should just need to change the endpoint in the config file to switch between environments. As it stands, you've got two completely different services. There's no guarantee that code written against one version will work against the other.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        J T 2 Replies Last reply
        0
        • T TNCaver

          We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?

          If you think 'goto' is evil, try writing an Assembly program without JMP.

          R Offline
          R Offline
          RickZeeland
          wrote on last edited by
          #9

          I can recommend this user friendly Git client (for Windows and Mac): https://www.slant.co/topics/2089/viewpoints/21/~git-clients-for-windows~fork[^]

          1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            TNCaver wrote:

            they have both sandbox and production environments, and the WSDL for each are different.

            Sounds like a poor design. The WSDL should be the same for both; you should just need to change the endpoint in the config file to switch between environments. As it stands, you've got two completely different services. There's no guarantee that code written against one version will work against the other.


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            J Offline
            J Offline
            Jorgen Andersson
            wrote on last edited by
            #10

            :thumbsup:

            Wrong is evil and must be defeated. - Jeff Ello

            1 Reply Last reply
            0
            • Richard DeemingR Richard Deeming

              TNCaver wrote:

              they have both sandbox and production environments, and the WSDL for each are different.

              Sounds like a poor design. The WSDL should be the same for both; you should just need to change the endpoint in the config file to switch between environments. As it stands, you've got two completely different services. There's no guarantee that code written against one version will work against the other.


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              T Offline
              T Offline
              TNCaver
              wrote on last edited by
              #11

              It may be poor design, I don't know. It's Salesforce, and I've been impressed by the design behind most of their stuff. It's not perfect, but it's very clever. The differences are only in the user-customized pieces, and in the endpoint URL embedded in the WSDL.

              If you think 'goto' is evil, try writing an Assembly program without JMP.

              1 Reply Last reply
              0
              • T TNCaver

                We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?

                If you think 'goto' is evil, try writing an Assembly program without JMP.

                P Offline
                P Offline
                punkyguy
                wrote on last edited by
                #12

                You could use a post-checkout hook to make sure the appropriate DLL based on the branch name is copied in from an external location. I've never tried it but can't see why it wouldn't work?

                T 1 Reply Last reply
                0
                • T TNCaver

                  We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?

                  If you think 'goto' is evil, try writing an Assembly program without JMP.

                  D Offline
                  D Offline
                  Davyd McColl
                  wrote on last edited by
                  #13

                  One solution might be a submodule. Git submodules are versioned, so a branch can point at a specific version of the submodule (or, better yet, a specific branch or tag). You could have your wsdl code in a submodule which you reference from the main repo. The dev branch references the submodule commit with the dev wsdl and the prod branch references the submodule commit with the live wsdl. When merging from dev into master, you could ignore the submodule (ie, use the "take mine" approach mentioned elsewhere in this thread). The advantage is that it's really easy to see which wsdl you're using, especially if you use branches, because a "git branch" in the submodule folder could show you, for instance: * production development (meaning you have the production branch of the wsdl) -- in this way, you don't have to manually check the contents of the file, just that you're pointing at the correct branch.

                  1 Reply Last reply
                  0
                  • T TNCaver

                    We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?

                    If you think 'goto' is evil, try writing an Assembly program without JMP.

                    E Offline
                    E Offline
                    englebart
                    wrote on last edited by
                    #14

                    This post discusses using the "lock" command of git lfs. lock the master branch with the production version. [TFS 2017 using Git, lock specific files and folders? : git](https://www.reddit.com/r/git/comments/7x11sl/tfs\_2017\_using\_git\_lock\_specific\_files\_and\_folders/)

                    1 Reply Last reply
                    0
                    • P punkyguy

                      You could use a post-checkout hook to make sure the appropriate DLL based on the branch name is copied in from an external location. I've never tried it but can't see why it wouldn't work?

                      T Offline
                      T Offline
                      TNCaver
                      wrote on last edited by
                      #15

                      Thanks, I'm still fairly new to Git, and didn't know about post-checkout hooks. This is promising!

                      If you think 'goto' is evil, try writing an Assembly program without JMP.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups