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 Time again - what am I missing?

GIT Time again - what am I missing?

Scheduled Pinned Locked Moved The Lounge
collaborationannouncementcsharpvisual-studiosysadmin
70 Posts 28 Posters 4 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.
  • C charlieg

    So, as a side project, I've been delving into the git source control world (triggered by Visual Studio incorporating it), and I'm smelling something nasty. As in, what's the point, other than preference? I've insisted all of my development projects be in source control since the mid 80s. Back then, we were heavily developing on VMS, the version control system was CMS. I'm not sure back then we had the concept of branches and what not, but we could tag the code base for a specific release. I ran into one developer who kept his changes as file versions - it's a VMS thing. All it took was one purge command to lose ALL of the history.. shudder. Anyway.... So in the years to follow, I've motored through PVCS, ClearCase (shudder), VSS and SVN. After VSS burned me badly (there are many unflattering stories out there) due to a network outage, I transitioned all of my source control to svn. Supports concurrent development, tags, branches and merging and is far more robust than VSS. This would be about 15 years ago or so. Along comes this git upstart. And all of the comparisons between it and svn generally say git is better for concurrent development, blah blah blah. Oh and it's a distributed model. And it allows for branching, etc. Just like SVN. Exactly what am I missing? I simply do not see anything significant git brings to the table that svn does not. I nod to preferences, but can anyone provide real world examples of how git solved a version control problem better than svn? The most common "feature" articles say about git is some mumbling about not needing a central repo which makes no sense to me. Appreciate your thoughts.

    Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

    J Offline
    J Offline
    Juan Pablo Reyes Altamirano
    wrote on last edited by
    #58

    I've had the same thought for awhile now. I loved SVN and sometimes even went as far as copying the server's SVN folder to recreate the history & branches anywhere else in case I needed to. It was quite elegant otherwise (and being a developer of traditional closed-source commercial software it was just perfect). I did everything in command line then and I still do with GIT, but man that thing can lead you to headaches (that most of the time can only be resolved via command line). Probably GIT's only two advantages are: 1.- It's harder to fuck up when you forget to push and you get lost in your thousands of commits. You just git clone somewhere else and start comparing copies in the worst case scenario. 2.- I don't have to cron a backup of the server side SVN repository to backup the entire history & branches...git clone is precisely that.

    1 Reply Last reply
    0
    • L Lost User

      Sounds like how I work. I tool away for a couple of days; if I was on the right track, I compile, zip and save that version to a remote drive with a dated file name. Or start over. Repeat evey few days. No branches, twigs, leafs, buds, flowers, weeds. Sort of like how we did backups in the "old days". Except there are no carts with card trays or portable disk packs.

      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

      C Offline
      C Offline
      charlieg
      wrote on last edited by
      #59

      For one man teams that are diligent, it can work. When you get to more than one, it rapidly gets out of control. I still remember the day when I was cleaning up the project folder... and I purged all the versions. I had no idea. He almost had an aneurism... took a few deep breaths and explained to me why he had a twitch in his eye :) It's not like I was on a mission, I was trying to help free up some disk space we needed... So, there I was with this "I just took a bite out of a ****-sandwich" on my face. Took a deep breath and said, "let me pull the backup tapes..." Thankfully they were from the day before and good. This was the day I had a career epiphany - delete nothing. Move it, archive it, but delete be bad.

      Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

      1 Reply Last reply
      0
      • M Maximilien

        There's nothing inherently better in GIT compared to other modern source control systems. It does what it advertised to do. The 2 models are just different (centralised vs distributed) I've worked with SourceSafe, RCS, CVS, SVN, GIT and now Team Foundation. I came to love/hate git; mostly because it's so cryptic.

        CI/CD = Continuous Impediment/Continuous Despair

        C Offline
        C Offline
        charlieg
        wrote on last edited by
        #60

        The part that had me confused is that ultimately, all code *must* go back to the main server - just like SVN. What I did not comprehend is that when you pull a project from a GIT repo it's almost as if you copied the repo to your local machine. Once you push your changes back to the server, the magic of software kicks in, there is smoke and flashes of light and it all gets put back together. I'm not sure if that justifies hyperventilating over GIT, but I understand the subtle difference now. as other's have commented, it was born of distributed open source development. I live in a proprietary internal network with fiber everywhere, so I just did not see the "glowing" points for GIT. At the end of the day, it's just another source control system.

        Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

        1 Reply Last reply
        0
        • J jschell

          charlieg wrote:

          Like I do, but I lost that battle long ago.

          Did you mention due diligence and legal costs associated with copyright violations? I like to point that out when someone complains because I insist the find the license. That due diligence comment really makes C level execs perk up.

          C Offline
          C Offline
          charlieg
          wrote on last edited by
          #61

          " copyright violations?" Please elaborate, I'm not following you. All of our code belongs to us. As for your description of enterprise level development, holy cow, I've not done anything like that in 20+ years. Thinking back to when I did gave me a headache :)

          Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

          J 1 Reply Last reply
          0
          • P Peter Adam

            With git, you get two vcs for the price of one. You have a local one and probably a remote one. At work asking for a repo was heavy paperwork. With svn I had no opportunity to put my small projects into version control. With git I can create a local repo without involving paperwork or someone from the sudoers group. In git, the master repo can be protected by using pull requests instead of just giving rights to push into the master repo.

            C Offline
            C Offline
            charlieg
            wrote on last edited by
            #62

            to be fair, that's not an svn issue - it's a process issue. For our SVN server, you want a repo, we RDP in and make a repo, though I see the point that it's a manual operation. We don't have a lot of developers just wanting random repos, so valid point.

            Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

            P 1 Reply Last reply
            0
            • M Mateusz Jakub

              I was using SVN briefly when I was on first job after university so I might not remember it correctly but I remember frustrations it was giving me and I hated it with every piece of my body. Using GIT was a breeze and I instantly got the mental model, so I might be biased for using it for last 14 years and remembering SVN workflow as workflow from hell. So I have a lot to write on the topic - because I feel that GIT is just so much better and it makes me much better developer and development so much easier. Let's start with not needing connection to the server to be able to create commits. When internet is down I still can create commits move them around and publish to server when I want not when SVN wants. Also if I have it locally it is much faster to commit anything than over the network. (almost no one uses fully distributed workflow so yeah) Branching is something you just do in GIT and you don't have to ask anyone because branches don't live on the server. I can do 10 commits then go back to starting point and make new branch in matter of minutes and have different approach developed, I can delete local branch that I don't like and publish stuff I do like. No one will ever see it. Conflicts, I can fetch changes from remote repository and have my local branch separate, I can keep on working on my stuff until I want to merge things while also having possibility to easily switch to. With SVN I am forced to deal with stuff even when I am half way done but I also want to check what is there so I could prepare for it. In general mental model for having undo outside code editor that I can view and cherry pick, staging chunks of files to move parts of my development outside of IDE - because some things can be added by IDE and I can control what I publish in perfect way gives me ease of mind. Where SVN tooling was rudimentary at best, maybe it changed as I not used it.

              C Offline
              C Offline
              charlieg
              wrote on last edited by
              #63

              "Let's start with not needing connection to the server to be able to create commits" This is the key difference that is NOT well explained when comparing GIT to SVN. The fact that you can have all of the source control actions local including comments and what not falls under what I would call a "useful feature." :) In my shop, any developer can create branches and tags and have done so for years. So, when people say "branching is a breeze in GIT as compared to SVN" no brilliant flash of the obvious came to mind. The only thing that MUST be done as an admin is to create a new repo.

              Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

              M 1 Reply Last reply
              0
              • C charlieg

                to be fair, that's not an svn issue - it's a process issue. For our SVN server, you want a repo, we RDP in and make a repo, though I see the point that it's a manual operation. We don't have a lot of developers just wanting random repos, so valid point.

                Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                P Offline
                P Offline
                Peter Adam
                wrote on last edited by
                #64

                I am an application operator, so I do not have Administrator / root rights anywhere, I don't have remote login rights, etc. With centralized VCS, I need a sudoer to create a repo. With git + TortoiseGit, I can make a local repo anywhere, and at least track my scripts. This is centralized vs. distributed, svn vs. git. (At home I use svn, because, as we say here, everything is beautiful at home, 6 cores, 12 threads, 32 GB of RAM and sudo rigths ;) )

                1 Reply Last reply
                0
                • C charlieg

                  So, as a side project, I've been delving into the git source control world (triggered by Visual Studio incorporating it), and I'm smelling something nasty. As in, what's the point, other than preference? I've insisted all of my development projects be in source control since the mid 80s. Back then, we were heavily developing on VMS, the version control system was CMS. I'm not sure back then we had the concept of branches and what not, but we could tag the code base for a specific release. I ran into one developer who kept his changes as file versions - it's a VMS thing. All it took was one purge command to lose ALL of the history.. shudder. Anyway.... So in the years to follow, I've motored through PVCS, ClearCase (shudder), VSS and SVN. After VSS burned me badly (there are many unflattering stories out there) due to a network outage, I transitioned all of my source control to svn. Supports concurrent development, tags, branches and merging and is far more robust than VSS. This would be about 15 years ago or so. Along comes this git upstart. And all of the comparisons between it and svn generally say git is better for concurrent development, blah blah blah. Oh and it's a distributed model. And it allows for branching, etc. Just like SVN. Exactly what am I missing? I simply do not see anything significant git brings to the table that svn does not. I nod to preferences, but can anyone provide real world examples of how git solved a version control problem better than svn? The most common "feature" articles say about git is some mumbling about not needing a central repo which makes no sense to me. Appreciate your thoughts.

                  Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                  S Offline
                  S Offline
                  Stacy Dudovitz
                  wrote on last edited by
                  #65

                  The point of GIT, and what it's trying to solve basically boils down to this: 1) The repository lives on your local OS file system. What that offers is a way to version control anything you want (more on text vs. binary ahead), and can sneaker net the entire repository with the copy command without losing version information of changes! All of the deltas and history are all contained in a nice neat folder named .git. 2) You can also (instead of sneaker net) host the source code on a remote server, which allows anyone with the necessary privileges to pull or commit changes. 3) You can apply filters on what files are committed (checked-in for SVN/SourceSafe users) using the .gitignore file. This text file lets you filter out compiler files (e.g. .objs) and auto-generated files (e.g. files that change by the build process and cannot/should not be modified). 4) The real power comes in with the versioning. Every commit from the first repository creation is demarcated with a SHA. Git SHAs are unique identifiers for commits, files, and other objects in a Git repository. 5) What can you do with SHAs? You can branch off of anywhere to create a separate set of commits unique to that branch. Example: You might want to branch at a project release point, so that development can continue while changes are frozen. Here is where real power lies. Devs have the ability to continue to make commits to the branch (e.g. a QA branch when devs get feedback on bugs to make fixes), while development continues along the main line. When the QA branch is blessed and has all of the fixes necessary to promote to release, the changes can be merged back into the main line. While most of that can be automated, some user interaction might (often will) be necessary to resolve conflicts. 6) In projects of 2 or more devs, typically there are multiple concurrent branches. Example: Development, QA and Release. Depending on the shop, some choose to branch to make a latest QA, some merge the latest dev line into a separate QA line. There are variations on the theme, but the takeaway is that you can make Git adapt to your dev culture, and not the other way around. 7) Lastly, there are "stupid Git tricks" that can make life easier (and more complicated, depending on your perspective). Example: One can Rebase to get to a "clean" state. A rebase will simply drop merge commits from the todo list, and put the rebased commits into a single, linear branch. Rebase, along with <

                  1 Reply Last reply
                  0
                  • C charlieg

                    " copyright violations?" Please elaborate, I'm not following you. All of our code belongs to us. As for your description of enterprise level development, holy cow, I've not done anything like that in 20+ years. Thinking back to when I did gave me a headache :)

                    Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #66

                    charlieg wrote:

                    All of our code belongs to us.

                    So your company does not use 3rd party libraries of any kind? Only time I have heard of that is significantly intense DOD work.

                    C 1 Reply Last reply
                    0
                    • C charlieg

                      "Let's start with not needing connection to the server to be able to create commits" This is the key difference that is NOT well explained when comparing GIT to SVN. The fact that you can have all of the source control actions local including comments and what not falls under what I would call a "useful feature." :) In my shop, any developer can create branches and tags and have done so for years. So, when people say "branching is a breeze in GIT as compared to SVN" no brilliant flash of the obvious came to mind. The only thing that MUST be done as an admin is to create a new repo.

                      Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                      M Offline
                      M Offline
                      Mateusz Jakub
                      wrote on last edited by
                      #67

                      Yeah that is for me "distributed" part that is basically killer feature. Unfortunately people throw "distributed" around like everyone should be mailing patches to Linus himself and other contributors just like it is some holy grail - but no one uses it like that so everyone only gets more confused.

                      1 Reply Last reply
                      0
                      • J jschell

                        charlieg wrote:

                        Like I do, but I lost that battle long ago.

                        Did you mention due diligence and legal costs associated with copyright violations? I like to point that out when someone complains because I insist the find the license. That due diligence comment really makes C level execs perk up.

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

                        Agree 100% on the license. Especially with the older licenses. Include and enhance the wrong “open source” component and you might have to disclose your whole product. Also the free for development but pay for production licenses can bite you.

                        J 1 Reply Last reply
                        0
                        • E englebart

                          Agree 100% on the license. Especially with the older licenses. Include and enhance the wrong “open source” component and you might have to disclose your whole product. Also the free for development but pay for production licenses can bite you.

                          J Offline
                          J Offline
                          jschell
                          wrote on last edited by
                          #69

                          Yes I have seen both of those also.

                          1 Reply Last reply
                          0
                          • J jschell

                            charlieg wrote:

                            All of our code belongs to us.

                            So your company does not use 3rd party libraries of any kind? Only time I have heard of that is significantly intense DOD work.

                            C Offline
                            C Offline
                            charlieg
                            wrote on last edited by
                            #70

                            Okay, I follow you now. They tend to hide behind other vendors if they are spending $$. But the developers tend to play around, and licensing of this sort is so far off the radar...

                            Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                            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