The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
A man was driving along the highway, and saw a rabbit hopping across the middle of the road. He swerved to avoid hitting the rabbit, but unfortunately the rabbit jumped in front of the car and was hit. The driver, being a sensitive man as well as an animal lover, pulled over to the side of the road and got out to see what had become of the rabbit. Much to his dismay, the rabbit was dead. The driver felt so awful he began to cry.
A woman driving down the highway saw the man crying on the side of the road and pulled over. She stepped out of her car and asked the man what was wrong.
"I feel terrible," he explained. "I accidently hit this rabbit and killed it."
The woman told the man not to worry. She knew what to do. She went to her car trunk and pulled out a spray can. She walked over to the limp, dead rabbit, and sprayed the contents of the can onto the rabbit. Miraculously, the rabbit came to life, jumped up, waved its paw at the two humans and hopped down the road. 50 feet away the rabbit stopped, turned around, waved at the two again, hopped down the road another 50 feet, turned, waved, and hopped another 50 feet. The man was astonished. He couldn't figure out what substance could be in the woman's spray can! He ran over to the woman and demanded, " What was in your spray can? What did you spray onto that rabbit?" The woman turned the can around so that the man could read the label. It said:
"'Hare Spray' Restores Life to Dead Hare. Adds Permanent Wave."
Anything that is unrelated to elephants is irrelephant Anonymous - The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 - Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
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.
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).
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:
(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.
Last Visit: 31-Dec-99 18:00 Last Update: 11-May-21 10:28