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. How to use source control

How to use source control

Scheduled Pinned Locked Moved The Lounge
helpjavascriptpythoncomtutorial
41 Posts 21 Posters 2 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.
  • J Jacquers

    If it's git you are working with I can recommend SourceTree, it makes doing most git things way easier (for me at least) than the command line.

    M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #17

    Jacquers wrote:

    If it's git you are working with I can recommend SourceTree,

    TFS. And it's not the technology that is the issue, it's the workflow that people said I should use when I asked the question, how do you handle working on A when a bug request comes in for B? And the reason I asked was, sadly, I was afraid the answer was as described.

    Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

    C 1 Reply Last reply
    0
    • M Marc Clifton

      NOT. 1. Check out the dev branch. 2. Start working on a new feature 3. You're asked to fix a bug on the same project not related to the feature you're adding. 4. Manually copy the code to somewhere else that you've been working on for the new feature. 5. Revert your local branch back to the master version 6. Fix the bug. 7. Check in the change. 8. Manually copy back the code that you were working on for the new feature. 9. Manually add back in the bug fix. 10. Keep working on the feature. Yes, this is actually what I was told as "how to do it" because branching can get too complicated. :laugh: :rolleyes: :sigh:

      Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

      K Offline
      K Offline
      Kirk 10389821
      wrote on last edited by
      #18

      I had a gent tell me he had 5 years of SVN experience. I said, great... Then please start using branches and get off the main branch. He replied... "I've never done branching"... to which I said... "then you have about 30 minutes of SVN experience, repeatedly, over 5 years!" He eventually said... "Wow, I wish I would have known about branches before..." ROTFLMAO!

      1 Reply Last reply
      0
      • M Marc Clifton

        NOT. 1. Check out the dev branch. 2. Start working on a new feature 3. You're asked to fix a bug on the same project not related to the feature you're adding. 4. Manually copy the code to somewhere else that you've been working on for the new feature. 5. Revert your local branch back to the master version 6. Fix the bug. 7. Check in the change. 8. Manually copy back the code that you were working on for the new feature. 9. Manually add back in the bug fix. 10. Keep working on the feature. Yes, this is actually what I was told as "how to do it" because branching can get too complicated. :laugh: :rolleyes: :sigh:

        Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #19

        You need to roll your own so it does what you want and you know how to use it.

        1 Reply Last reply
        0
        • R raddevus

          PeejayAdams wrote:

          It's a wonderfully easy way to do something but it has an utterly non-intuitive and inappropriate name.

          Yes, I totally agree with that. The name of that command is completely non-intuitive to the level of stupidity. edit I guess that could be because I used subversion for so long where you : branch switch which seems somewhat intuitive. However, Git is so far superior to subversion I am willing to put up with bad naming. :)

          P Offline
          P Offline
          PeejayAdams
          wrote on last edited by
          #20

          Yes, I guess I'm also still a little bit stuck in a Subversion and Mercurial mind-set.

          98.4% of statistics are made up on the spot.

          1 Reply Last reply
          0
          • H HobbyProggy

            Marc Clifton wrote:

            • Check out the dev branch.
            • Start working on a new feature
            • You're asked to fix a bug on the same project not related to the feature you're adding.
            • Manually copy the code to somewhere else that you've been working on for the new feature.* Revert your local branch back to the master version* Fix the bug.
            • Check in the change.
            • Manually copy back the code that you were working on for the new feature.* Manually add back in the bug fix.* Keep working on the feature.

            Way easier :-\

            Rules for the FOSW ![^]

            if(!string.IsNullOrWhiteSpace(_signature))
            {
            MessageBox.Show("This is my signature: " + Environment.NewLine + _signature);
            }
            else
            {
            MessageBox.Show("404-Signature not found");
            }

            C Offline
            C Offline
            Clifford Nelson
            wrote on last edited by
            #21

            LOL

            1 Reply Last reply
            0
            • M Marc Clifton

              NOT. 1. Check out the dev branch. 2. Start working on a new feature 3. You're asked to fix a bug on the same project not related to the feature you're adding. 4. Manually copy the code to somewhere else that you've been working on for the new feature. 5. Revert your local branch back to the master version 6. Fix the bug. 7. Check in the change. 8. Manually copy back the code that you were working on for the new feature. 9. Manually add back in the bug fix. 10. Keep working on the feature. Yes, this is actually what I was told as "how to do it" because branching can get too complicated. :laugh: :rolleyes: :sigh:

              Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

              C Offline
              C Offline
              Clifford Nelson
              wrote on last edited by
              #22

              I work contract, so I have worked with a bunch of different source control systems. By far the easiest has been TFS, and it has gotten better with the years. Issues I have found with other systems: 1) Shelf Set does not exist, and this is so easy to fix bugs in your system, so partial check-ins, etc 2) It seems impossible to have two versions on your system at one time, so cannot easily work on two features at once, and cannot get somebody else's version and do whatever you need with it. 3) The only way to get (git) you code updated when somebody else has posted changes is to commit your changes. I have not yet found a product that works better with Visual Studio than TFS, and find it amazing that all these companies continue to use crappy source control which they even pay for, which significantly impact developer productivity...typical penny wise pound foolish or maybe just plain foolish.

              S M D 3 Replies Last reply
              0
              • M Marc Clifton

                Jacquers wrote:

                If it's git you are working with I can recommend SourceTree,

                TFS. And it's not the technology that is the issue, it's the workflow that people said I should use when I asked the question, how do you handle working on A when a bug request comes in for B? And the reason I asked was, sadly, I was afraid the answer was as described.

                Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                C Offline
                C Offline
                Clifford Nelson
                wrote on last edited by
                #23

                Yes...TFS seems to be the best. Not sure about relative front end cost, but the only reason I can see to justify using something else is if it is free, and even then it is probably a stupid move.

                S 1 Reply Last reply
                0
                • M Marc Clifton

                  Eddy Vluggen wrote:

                  There is a shelf-feature in VS

                  Yes, and a stash (not sure if that's the git equivalent though) but nobody uses it.

                  Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #24

                  I have, obviously :)

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

                  1 Reply Last reply
                  0
                  • S Slacker007

                    In TFS you can shelve changes, which is better than branching. Does Git have something similar? I don't know. But your description brought a smile to face. :)

                    S Offline
                    S Offline
                    Scott Serl
                    wrote on last edited by
                    #25

                    When using git, there is no reason not to branch. Besides, I commit every 15 minutes or so while working, so can't just stash (git equiv. to shelve) and work on something else. Just make a branch (takes about 10 seconds or less) and fix it there. Merging is generally not an issue in git (I have only had one merge conflict in the last month on a team of 7 devs and used to have many in TFS).

                    S 1 Reply Last reply
                    0
                    • S Scott Serl

                      When using git, there is no reason not to branch. Besides, I commit every 15 minutes or so while working, so can't just stash (git equiv. to shelve) and work on something else. Just make a branch (takes about 10 seconds or less) and fix it there. Merging is generally not an issue in git (I have only had one merge conflict in the last month on a team of 7 devs and used to have many in TFS).

                      S Offline
                      S Offline
                      Slacker007
                      wrote on last edited by
                      #26

                      Merge conflicts usually only occur if the same file was worked on by more than one person, prior to check in/merge. We do our best not to let this happen, and "that" is what controls merge conflicts, not the software.

                      S 1 Reply Last reply
                      0
                      • C Clifford Nelson

                        Yes...TFS seems to be the best. Not sure about relative front end cost, but the only reason I can see to justify using something else is if it is free, and even then it is probably a stupid move.

                        S Offline
                        S Offline
                        Scott Serl
                        wrote on last edited by
                        #27

                        git is free. Microsoft uses git for much of their development. git has quite a bit of integration with Visual Studio.

                        1 Reply Last reply
                        0
                        • C Clifford Nelson

                          I work contract, so I have worked with a bunch of different source control systems. By far the easiest has been TFS, and it has gotten better with the years. Issues I have found with other systems: 1) Shelf Set does not exist, and this is so easy to fix bugs in your system, so partial check-ins, etc 2) It seems impossible to have two versions on your system at one time, so cannot easily work on two features at once, and cannot get somebody else's version and do whatever you need with it. 3) The only way to get (git) you code updated when somebody else has posted changes is to commit your changes. I have not yet found a product that works better with Visual Studio than TFS, and find it amazing that all these companies continue to use crappy source control which they even pay for, which significantly impact developer productivity...typical penny wise pound foolish or maybe just plain foolish.

                          S Offline
                          S Offline
                          Scott Serl
                          wrote on last edited by
                          #28

                          1. use git stash (but I rarely use it as I commit locally every 15 minutes or so). 2. that's what branches are for. if you need to work on someone else's branch, have them push it to the server and then pull the branch locally to work on it (do this as often as necessary while both of you work on it or pull directly from their local). 3. merge from [branch you want changes from] to your branch (you should be committing often anyway, so committing should not be an issue).

                          C 1 Reply Last reply
                          0
                          • S Slacker007

                            Merge conflicts usually only occur if the same file was worked on by more than one person, prior to check in/merge. We do our best not to let this happen, and "that" is what controls merge conflicts, not the software.

                            S Offline
                            S Offline
                            Scott Serl
                            wrote on last edited by
                            #29

                            If you like to manually control merge conflicts, that's great, but I would rather let the software be better at merging and only get involved when there is truly a bad conflict. There are always certain files that are frequently modified (configuration files, common UI, etc.) and if your software can intelligently merge the code for you, then I welcome it. I have used almost every source control software out there in my 30+ years of development (some of them as a build automation engineer) and git gives a better development experience than most (ok, I prefer Mercurial, but the industry chose git and I use github for collaboration on my private projects).

                            1 Reply Last reply
                            0
                            • C Clifford Nelson

                              I work contract, so I have worked with a bunch of different source control systems. By far the easiest has been TFS, and it has gotten better with the years. Issues I have found with other systems: 1) Shelf Set does not exist, and this is so easy to fix bugs in your system, so partial check-ins, etc 2) It seems impossible to have two versions on your system at one time, so cannot easily work on two features at once, and cannot get somebody else's version and do whatever you need with it. 3) The only way to get (git) you code updated when somebody else has posted changes is to commit your changes. I have not yet found a product that works better with Visual Studio than TFS, and find it amazing that all these companies continue to use crappy source control which they even pay for, which significantly impact developer productivity...typical penny wise pound foolish or maybe just plain foolish.

                              M Offline
                              M Offline
                              Marc Clifton
                              wrote on last edited by
                              #30

                              One thing I appreciate about TFS is that it is visually and verbally descriptive, particularly when it comes to merges. Merge "from". Merge "to". Thank you. How hard is that for Git and several of the front ends I've tried to actually be clear about that?

                              Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                              StarNamer workS 1 Reply Last reply
                              0
                              • S Scott Serl

                                1. use git stash (but I rarely use it as I commit locally every 15 minutes or so). 2. that's what branches are for. if you need to work on someone else's branch, have them push it to the server and then pull the branch locally to work on it (do this as often as necessary while both of you work on it or pull directly from their local). 3. merge from [branch you want changes from] to your branch (you should be committing often anyway, so committing should not be an issue).

                                C Offline
                                C Offline
                                Clifford Nelson
                                wrote on last edited by
                                #31

                                I just find it extremely awkward compared to TFS. TFS seems to be almost trivial to use, which is not true with the others. I am more interested in learning to be a better programmer than learning what I consider a badly designed tool when I really don't need to learn much to use TFS. Everything has always seemed pretty obvious.

                                1 Reply Last reply
                                0
                                • C Clifford Nelson

                                  I work contract, so I have worked with a bunch of different source control systems. By far the easiest has been TFS, and it has gotten better with the years. Issues I have found with other systems: 1) Shelf Set does not exist, and this is so easy to fix bugs in your system, so partial check-ins, etc 2) It seems impossible to have two versions on your system at one time, so cannot easily work on two features at once, and cannot get somebody else's version and do whatever you need with it. 3) The only way to get (git) you code updated when somebody else has posted changes is to commit your changes. I have not yet found a product that works better with Visual Studio than TFS, and find it amazing that all these companies continue to use crappy source control which they even pay for, which significantly impact developer productivity...typical penny wise pound foolish or maybe just plain foolish.

                                  D Offline
                                  D Offline
                                  decaffeinatedMonkey
                                  wrote on last edited by
                                  #32

                                  I also find TFS very useful for source control. One can create multiple "TFS workspaces" to simulate cloning a repository (i.e. cloning in Git). Shelvesets are an easy way to share coffee snippets with others as well. I will say that Git has a bunch of visual editors now that made using it much simpler these days. Some people I know will forever stick to the command line interface though.

                                  1 Reply Last reply
                                  0
                                  • M Marc Clifton

                                    NOT. 1. Check out the dev branch. 2. Start working on a new feature 3. You're asked to fix a bug on the same project not related to the feature you're adding. 4. Manually copy the code to somewhere else that you've been working on for the new feature. 5. Revert your local branch back to the master version 6. Fix the bug. 7. Check in the change. 8. Manually copy back the code that you were working on for the new feature. 9. Manually add back in the bug fix. 10. Keep working on the feature. Yes, this is actually what I was told as "how to do it" because branching can get too complicated. :laugh: :rolleyes: :sigh:

                                    Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                    S Offline
                                    S Offline
                                    Slow Eddie
                                    wrote on last edited by
                                    #33

                                    I am a single programmer. I work alone, not in a team. I always used SourceSafe, still do for my VB6 work. I tried TFS and SVN for my .Net stuff and find them both confusing and cumbersome, in my circumstances. Is there a manual, book, or some kind of documentation or tutorial for one of the three? Better yet, is there some other source control system, that integrates into VS2015/VS2017 designed for programmers/developers that do not work in a team?:confused: X| Suggestions would be appreciated.

                                    It's a random chance Universe and we are all out there surfing waves of probability...

                                    D 1 Reply Last reply
                                    0
                                    • M Marc Clifton

                                      One thing I appreciate about TFS is that it is visually and verbally descriptive, particularly when it comes to merges. Merge "from". Merge "to". Thank you. How hard is that for Git and several of the front ends I've tried to actually be clear about that?

                                      Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                      StarNamer workS Offline
                                      StarNamer workS Offline
                                      StarNamer work
                                      wrote on last edited by
                                      #34

                                      TFS/VSTS also has workspaces. So, as an alternative to shelving the current project and doing a bug fix, you could also just switch to another workspace for the same branch and do the fix there. I've used up to 5 workspaces for our DEV branch when having to move from a feature development to do an urgent fix, which gets sidetracked by a critical fix, .... I suppose the git equivalent would simply be creating another local repository (git clone)?

                                      M 1 Reply Last reply
                                      0
                                      • M Marc Clifton

                                        NOT. 1. Check out the dev branch. 2. Start working on a new feature 3. You're asked to fix a bug on the same project not related to the feature you're adding. 4. Manually copy the code to somewhere else that you've been working on for the new feature. 5. Revert your local branch back to the master version 6. Fix the bug. 7. Check in the change. 8. Manually copy back the code that you were working on for the new feature. 9. Manually add back in the bug fix. 10. Keep working on the feature. Yes, this is actually what I was told as "how to do it" because branching can get too complicated. :laugh: :rolleyes: :sigh:

                                        Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                        N Offline
                                        N Offline
                                        nightsoul94
                                        wrote on last edited by
                                        #35

                                        Okay, maybe I am insane, but I have never gotten why people have problems with branching/merging whether it is with TFS or GIT or whatever source control. Early in my career, I think 10 or more years ago, I read a white paper from Microsoft on the best practices for handling version control branching in TFS. This may well have been before GIT even existed. The paper was clear and concise, left multiple choices on branching/merging strategies and how to handle conflicts and other problems in source control. As far as I know, that white paper is still out there and available and even though it is old now, it is still very relevant. I read it once, reviewed it a couple of years later and I haven't had a problem with source control since. Everything made sense and it has always been easy for me. Like I said, maybe I am insane, but I encounter many developers that can't handle branching/merging and conflicts and I truly don't get the problem. Maybe you guys can clue me in.

                                        M 1 Reply Last reply
                                        0
                                        • M Marc Clifton

                                          NOT. 1. Check out the dev branch. 2. Start working on a new feature 3. You're asked to fix a bug on the same project not related to the feature you're adding. 4. Manually copy the code to somewhere else that you've been working on for the new feature. 5. Revert your local branch back to the master version 6. Fix the bug. 7. Check in the change. 8. Manually copy back the code that you were working on for the new feature. 9. Manually add back in the bug fix. 10. Keep working on the feature. Yes, this is actually what I was told as "how to do it" because branching can get too complicated. :laugh: :rolleyes: :sigh:

                                          Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                                          D Offline
                                          D Offline
                                          Daniel R Przybylski
                                          wrote on last edited by
                                          #36

                                          Check out the dev branch. Create a new local branch for that feature. Start working on a new feature You're asked to fix a bug on the same project not related to the feature you're adding. Commit your work for the new feature to the local feature branch. Checkout the local dev branch. Pull to get anything from origin that has been done since you started working on that new feature. Create a new local branch for that bug. Fix said bug. Commit your work to the local bug branch & push that bug local branch to origin and start a pull request. While a peer or lead checks over you code in that origin/bug/branch, you checkout your local feature branch. Continue working on feature. Reviewer tells you that you should change something. You grab a stress ball in one hand while reading their review all the while thinking, "Who is s/he to suggest that it could be better...," until you see the glaringly obvious bug. Commit your work for the new feature. Checkout the local bug branch. Implement the suggested code fix. Commit and push (to the origin/bug branch.) Re-request pull. Pull goes thru and is merged to dev on the server. Checkout local dev branch. Pull from origin. Checkout local feature branch. Merge from dev. Delete local bug branch. Continue working on feature until finished or you get another, "If you could fix this bug (and by bug they mean that they want a font size change), that would great..." Then restart the cycle started in step 5. If feature branch is done, commit & push that branch to origin, ask for a pull request for that branch. Do anything to implement any feedback from pull request until is right. And then see what they want you to work on next. No one needs to know how many local branches you're working with. We are talking about Git, right?

                                          M 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