Tracking changes SVN vs Git












0















Whilst watching a tutorial on Lynda.com regarding Distributed Version Control Systems vs Centralized Version Control Systems, I came across some text which confused me on how Git tracks differently than the Centralized Version Control Systems. I always thought the mentioned VCS were tracking changes and when commiting you are saving the snapshot of these changes to the repository which is used to get from version-to-version. But for some reason the following text claims that Git doesn't work this way.



Can anyone try to explain and clearify this for me?




In Git the changes are stored as change sets or patches, and we're focused on tracking changes not the versions of the document. Now that's a subtle difference, you may think, well, CVS and SVN those track changes too, they don't. They track the changes that it takes to get from version-to-version of each of the different files or the different states of a directory. Git doesn't work that way, Git really focuses on these change sets in encapsulating a change set as a discrete unit and then those change sets can be exchanged between repositories. We're not trying to keep up-to-date with the latest version of something instead the question is, do we have a change set applied or not?











share|improve this question


















  • 1





    You may want to read Chapter 10 of Pro Git, which explains how Git actually stores files. Put very briefly, each version of a file is stored in its entirety as a "blob", and a commit is just a set of pointers to the blobs representing the files at a point in time. Two commits can reference the same blob if the file does not change between the commits. Occasionally, to save space, older commits are "packed", at which point the commit really is just a set of diffs between files.

    – chepner
    Nov 26 '18 at 14:47






  • 1





    I'd say that the big differences are the centralized vs decentralized, linear history vs DAG graph history, file-level tracking vs repo-level tracking. Those who make a big deal of "tracking the repository state" vs. "tracking changes" (e.g. the differences between the way changes/state are stored in Mercurial vs git) are arguing semantics and tiny details that most people never need to even think about.

    – Mort
    Dec 9 '18 at 3:46
















0















Whilst watching a tutorial on Lynda.com regarding Distributed Version Control Systems vs Centralized Version Control Systems, I came across some text which confused me on how Git tracks differently than the Centralized Version Control Systems. I always thought the mentioned VCS were tracking changes and when commiting you are saving the snapshot of these changes to the repository which is used to get from version-to-version. But for some reason the following text claims that Git doesn't work this way.



Can anyone try to explain and clearify this for me?




In Git the changes are stored as change sets or patches, and we're focused on tracking changes not the versions of the document. Now that's a subtle difference, you may think, well, CVS and SVN those track changes too, they don't. They track the changes that it takes to get from version-to-version of each of the different files or the different states of a directory. Git doesn't work that way, Git really focuses on these change sets in encapsulating a change set as a discrete unit and then those change sets can be exchanged between repositories. We're not trying to keep up-to-date with the latest version of something instead the question is, do we have a change set applied or not?











share|improve this question


















  • 1





    You may want to read Chapter 10 of Pro Git, which explains how Git actually stores files. Put very briefly, each version of a file is stored in its entirety as a "blob", and a commit is just a set of pointers to the blobs representing the files at a point in time. Two commits can reference the same blob if the file does not change between the commits. Occasionally, to save space, older commits are "packed", at which point the commit really is just a set of diffs between files.

    – chepner
    Nov 26 '18 at 14:47






  • 1





    I'd say that the big differences are the centralized vs decentralized, linear history vs DAG graph history, file-level tracking vs repo-level tracking. Those who make a big deal of "tracking the repository state" vs. "tracking changes" (e.g. the differences between the way changes/state are stored in Mercurial vs git) are arguing semantics and tiny details that most people never need to even think about.

    – Mort
    Dec 9 '18 at 3:46














0












0








0








Whilst watching a tutorial on Lynda.com regarding Distributed Version Control Systems vs Centralized Version Control Systems, I came across some text which confused me on how Git tracks differently than the Centralized Version Control Systems. I always thought the mentioned VCS were tracking changes and when commiting you are saving the snapshot of these changes to the repository which is used to get from version-to-version. But for some reason the following text claims that Git doesn't work this way.



Can anyone try to explain and clearify this for me?




In Git the changes are stored as change sets or patches, and we're focused on tracking changes not the versions of the document. Now that's a subtle difference, you may think, well, CVS and SVN those track changes too, they don't. They track the changes that it takes to get from version-to-version of each of the different files or the different states of a directory. Git doesn't work that way, Git really focuses on these change sets in encapsulating a change set as a discrete unit and then those change sets can be exchanged between repositories. We're not trying to keep up-to-date with the latest version of something instead the question is, do we have a change set applied or not?











share|improve this question














Whilst watching a tutorial on Lynda.com regarding Distributed Version Control Systems vs Centralized Version Control Systems, I came across some text which confused me on how Git tracks differently than the Centralized Version Control Systems. I always thought the mentioned VCS were tracking changes and when commiting you are saving the snapshot of these changes to the repository which is used to get from version-to-version. But for some reason the following text claims that Git doesn't work this way.



Can anyone try to explain and clearify this for me?




In Git the changes are stored as change sets or patches, and we're focused on tracking changes not the versions of the document. Now that's a subtle difference, you may think, well, CVS and SVN those track changes too, they don't. They track the changes that it takes to get from version-to-version of each of the different files or the different states of a directory. Git doesn't work that way, Git really focuses on these change sets in encapsulating a change set as a discrete unit and then those change sets can be exchanged between repositories. We're not trying to keep up-to-date with the latest version of something instead the question is, do we have a change set applied or not?








git svn version-control cvs dvcs






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 '18 at 10:21









JohnJohn

363




363








  • 1





    You may want to read Chapter 10 of Pro Git, which explains how Git actually stores files. Put very briefly, each version of a file is stored in its entirety as a "blob", and a commit is just a set of pointers to the blobs representing the files at a point in time. Two commits can reference the same blob if the file does not change between the commits. Occasionally, to save space, older commits are "packed", at which point the commit really is just a set of diffs between files.

    – chepner
    Nov 26 '18 at 14:47






  • 1





    I'd say that the big differences are the centralized vs decentralized, linear history vs DAG graph history, file-level tracking vs repo-level tracking. Those who make a big deal of "tracking the repository state" vs. "tracking changes" (e.g. the differences between the way changes/state are stored in Mercurial vs git) are arguing semantics and tiny details that most people never need to even think about.

    – Mort
    Dec 9 '18 at 3:46














  • 1





    You may want to read Chapter 10 of Pro Git, which explains how Git actually stores files. Put very briefly, each version of a file is stored in its entirety as a "blob", and a commit is just a set of pointers to the blobs representing the files at a point in time. Two commits can reference the same blob if the file does not change between the commits. Occasionally, to save space, older commits are "packed", at which point the commit really is just a set of diffs between files.

    – chepner
    Nov 26 '18 at 14:47






  • 1





    I'd say that the big differences are the centralized vs decentralized, linear history vs DAG graph history, file-level tracking vs repo-level tracking. Those who make a big deal of "tracking the repository state" vs. "tracking changes" (e.g. the differences between the way changes/state are stored in Mercurial vs git) are arguing semantics and tiny details that most people never need to even think about.

    – Mort
    Dec 9 '18 at 3:46








1




1





You may want to read Chapter 10 of Pro Git, which explains how Git actually stores files. Put very briefly, each version of a file is stored in its entirety as a "blob", and a commit is just a set of pointers to the blobs representing the files at a point in time. Two commits can reference the same blob if the file does not change between the commits. Occasionally, to save space, older commits are "packed", at which point the commit really is just a set of diffs between files.

– chepner
Nov 26 '18 at 14:47





You may want to read Chapter 10 of Pro Git, which explains how Git actually stores files. Put very briefly, each version of a file is stored in its entirety as a "blob", and a commit is just a set of pointers to the blobs representing the files at a point in time. Two commits can reference the same blob if the file does not change between the commits. Occasionally, to save space, older commits are "packed", at which point the commit really is just a set of diffs between files.

– chepner
Nov 26 '18 at 14:47




1




1





I'd say that the big differences are the centralized vs decentralized, linear history vs DAG graph history, file-level tracking vs repo-level tracking. Those who make a big deal of "tracking the repository state" vs. "tracking changes" (e.g. the differences between the way changes/state are stored in Mercurial vs git) are arguing semantics and tiny details that most people never need to even think about.

– Mort
Dec 9 '18 at 3:46





I'd say that the big differences are the centralized vs decentralized, linear history vs DAG graph history, file-level tracking vs repo-level tracking. Those who make a big deal of "tracking the repository state" vs. "tracking changes" (e.g. the differences between the way changes/state are stored in Mercurial vs git) are arguing semantics and tiny details that most people never need to even think about.

– Mort
Dec 9 '18 at 3:46












2 Answers
2






active

oldest

votes


















2














This tutorial is terribly wrong:




  1. Git does not store changesets. Git computes changesets, dynamically, upon request. (Git does do delta-compression inside pack files, but pack files are fairly well hidden, compared to Git's object storage model, which is deliberately exposed through hash IDs.)

  2. That's not a useful distinction when discussing distributed vs centralized. (See kan's answer as well.)


Here is what I have to say about distributed vs centralized in my own book:




The key difference between these two kinds of systems is that a centralized VCS has a designated master repository. There may be multiple copies of the master, or even multiple masters with some kind of synchronization protocol (e.g., ClearCase MultiSite), but there is only one master. Their design assumes this single-master-ship and thus is allowed to depend on it.



With a distributed VCS, there is no designated master repository. Users generally have a complete, private copy of each repository. Communications between these private copies are, at least in principle, peer-to-peer operations: neither repository is any more masterful, and conflicts—situations where both Alice and Bob have made changes to the same regions of the same files—can and do occur and require some kind of resolution.



It’s always possible to use a distributed VCS in a centralized manner: you simply designate one particular repository as the master version, and coordinate updates to it. However, centralized systems often provide features like locking source files or directories, restricting access (for read and/or write, to particular files, directories, and/or branches), and so on. With a typical DVCS it’s more difficult (though not technically impossible) to provide these, and Git and Mercurial simply don’t, at least not without add-ons. With CVCSes that provide locking, users may lock files (typically just one specific version ID) to prevent other users from making conflicting changes. This is conceptually easier, but of course it can prohibit parallel work.







share|improve this answer































    1














    In CVCS changes are syncronised around single central repository. So, commiting a change a user creates a single version in that repository for others.



    While in DVCS each user has it's own independent copy of repository and all changesets (or commits) go here initially. There is a separate process of synching changes between other user repositories using fetch/push commands.






    share|improve this answer
























    • ... and eventually you still have to commit / sync the changes into a centralized Git / DVCS repository in most cases.

      – bahrep
      Nov 26 '18 at 13:33











    • @bahrep Usually yes, and you are not forced to sync to only place when you want to save/share your changes.

      – kan
      Jan 9 at 15:14












    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fstackoverflow.com%2fquestions%2f53479020%2ftracking-changes-svn-vs-git%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    This tutorial is terribly wrong:




    1. Git does not store changesets. Git computes changesets, dynamically, upon request. (Git does do delta-compression inside pack files, but pack files are fairly well hidden, compared to Git's object storage model, which is deliberately exposed through hash IDs.)

    2. That's not a useful distinction when discussing distributed vs centralized. (See kan's answer as well.)


    Here is what I have to say about distributed vs centralized in my own book:




    The key difference between these two kinds of systems is that a centralized VCS has a designated master repository. There may be multiple copies of the master, or even multiple masters with some kind of synchronization protocol (e.g., ClearCase MultiSite), but there is only one master. Their design assumes this single-master-ship and thus is allowed to depend on it.



    With a distributed VCS, there is no designated master repository. Users generally have a complete, private copy of each repository. Communications between these private copies are, at least in principle, peer-to-peer operations: neither repository is any more masterful, and conflicts—situations where both Alice and Bob have made changes to the same regions of the same files—can and do occur and require some kind of resolution.



    It’s always possible to use a distributed VCS in a centralized manner: you simply designate one particular repository as the master version, and coordinate updates to it. However, centralized systems often provide features like locking source files or directories, restricting access (for read and/or write, to particular files, directories, and/or branches), and so on. With a typical DVCS it’s more difficult (though not technically impossible) to provide these, and Git and Mercurial simply don’t, at least not without add-ons. With CVCSes that provide locking, users may lock files (typically just one specific version ID) to prevent other users from making conflicting changes. This is conceptually easier, but of course it can prohibit parallel work.







    share|improve this answer




























      2














      This tutorial is terribly wrong:




      1. Git does not store changesets. Git computes changesets, dynamically, upon request. (Git does do delta-compression inside pack files, but pack files are fairly well hidden, compared to Git's object storage model, which is deliberately exposed through hash IDs.)

      2. That's not a useful distinction when discussing distributed vs centralized. (See kan's answer as well.)


      Here is what I have to say about distributed vs centralized in my own book:




      The key difference between these two kinds of systems is that a centralized VCS has a designated master repository. There may be multiple copies of the master, or even multiple masters with some kind of synchronization protocol (e.g., ClearCase MultiSite), but there is only one master. Their design assumes this single-master-ship and thus is allowed to depend on it.



      With a distributed VCS, there is no designated master repository. Users generally have a complete, private copy of each repository. Communications between these private copies are, at least in principle, peer-to-peer operations: neither repository is any more masterful, and conflicts—situations where both Alice and Bob have made changes to the same regions of the same files—can and do occur and require some kind of resolution.



      It’s always possible to use a distributed VCS in a centralized manner: you simply designate one particular repository as the master version, and coordinate updates to it. However, centralized systems often provide features like locking source files or directories, restricting access (for read and/or write, to particular files, directories, and/or branches), and so on. With a typical DVCS it’s more difficult (though not technically impossible) to provide these, and Git and Mercurial simply don’t, at least not without add-ons. With CVCSes that provide locking, users may lock files (typically just one specific version ID) to prevent other users from making conflicting changes. This is conceptually easier, but of course it can prohibit parallel work.







      share|improve this answer


























        2












        2








        2







        This tutorial is terribly wrong:




        1. Git does not store changesets. Git computes changesets, dynamically, upon request. (Git does do delta-compression inside pack files, but pack files are fairly well hidden, compared to Git's object storage model, which is deliberately exposed through hash IDs.)

        2. That's not a useful distinction when discussing distributed vs centralized. (See kan's answer as well.)


        Here is what I have to say about distributed vs centralized in my own book:




        The key difference between these two kinds of systems is that a centralized VCS has a designated master repository. There may be multiple copies of the master, or even multiple masters with some kind of synchronization protocol (e.g., ClearCase MultiSite), but there is only one master. Their design assumes this single-master-ship and thus is allowed to depend on it.



        With a distributed VCS, there is no designated master repository. Users generally have a complete, private copy of each repository. Communications between these private copies are, at least in principle, peer-to-peer operations: neither repository is any more masterful, and conflicts—situations where both Alice and Bob have made changes to the same regions of the same files—can and do occur and require some kind of resolution.



        It’s always possible to use a distributed VCS in a centralized manner: you simply designate one particular repository as the master version, and coordinate updates to it. However, centralized systems often provide features like locking source files or directories, restricting access (for read and/or write, to particular files, directories, and/or branches), and so on. With a typical DVCS it’s more difficult (though not technically impossible) to provide these, and Git and Mercurial simply don’t, at least not without add-ons. With CVCSes that provide locking, users may lock files (typically just one specific version ID) to prevent other users from making conflicting changes. This is conceptually easier, but of course it can prohibit parallel work.







        share|improve this answer













        This tutorial is terribly wrong:




        1. Git does not store changesets. Git computes changesets, dynamically, upon request. (Git does do delta-compression inside pack files, but pack files are fairly well hidden, compared to Git's object storage model, which is deliberately exposed through hash IDs.)

        2. That's not a useful distinction when discussing distributed vs centralized. (See kan's answer as well.)


        Here is what I have to say about distributed vs centralized in my own book:




        The key difference between these two kinds of systems is that a centralized VCS has a designated master repository. There may be multiple copies of the master, or even multiple masters with some kind of synchronization protocol (e.g., ClearCase MultiSite), but there is only one master. Their design assumes this single-master-ship and thus is allowed to depend on it.



        With a distributed VCS, there is no designated master repository. Users generally have a complete, private copy of each repository. Communications between these private copies are, at least in principle, peer-to-peer operations: neither repository is any more masterful, and conflicts—situations where both Alice and Bob have made changes to the same regions of the same files—can and do occur and require some kind of resolution.



        It’s always possible to use a distributed VCS in a centralized manner: you simply designate one particular repository as the master version, and coordinate updates to it. However, centralized systems often provide features like locking source files or directories, restricting access (for read and/or write, to particular files, directories, and/or branches), and so on. With a typical DVCS it’s more difficult (though not technically impossible) to provide these, and Git and Mercurial simply don’t, at least not without add-ons. With CVCSes that provide locking, users may lock files (typically just one specific version ID) to prevent other users from making conflicting changes. This is conceptually easier, but of course it can prohibit parallel work.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 '18 at 17:03









        torektorek

        198k18246328




        198k18246328

























            1














            In CVCS changes are syncronised around single central repository. So, commiting a change a user creates a single version in that repository for others.



            While in DVCS each user has it's own independent copy of repository and all changesets (or commits) go here initially. There is a separate process of synching changes between other user repositories using fetch/push commands.






            share|improve this answer
























            • ... and eventually you still have to commit / sync the changes into a centralized Git / DVCS repository in most cases.

              – bahrep
              Nov 26 '18 at 13:33











            • @bahrep Usually yes, and you are not forced to sync to only place when you want to save/share your changes.

              – kan
              Jan 9 at 15:14
















            1














            In CVCS changes are syncronised around single central repository. So, commiting a change a user creates a single version in that repository for others.



            While in DVCS each user has it's own independent copy of repository and all changesets (or commits) go here initially. There is a separate process of synching changes between other user repositories using fetch/push commands.






            share|improve this answer
























            • ... and eventually you still have to commit / sync the changes into a centralized Git / DVCS repository in most cases.

              – bahrep
              Nov 26 '18 at 13:33











            • @bahrep Usually yes, and you are not forced to sync to only place when you want to save/share your changes.

              – kan
              Jan 9 at 15:14














            1












            1








            1







            In CVCS changes are syncronised around single central repository. So, commiting a change a user creates a single version in that repository for others.



            While in DVCS each user has it's own independent copy of repository and all changesets (or commits) go here initially. There is a separate process of synching changes between other user repositories using fetch/push commands.






            share|improve this answer













            In CVCS changes are syncronised around single central repository. So, commiting a change a user creates a single version in that repository for others.



            While in DVCS each user has it's own independent copy of repository and all changesets (or commits) go here initially. There is a separate process of synching changes between other user repositories using fetch/push commands.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 26 '18 at 10:54









            kankan

            22.1k55285




            22.1k55285













            • ... and eventually you still have to commit / sync the changes into a centralized Git / DVCS repository in most cases.

              – bahrep
              Nov 26 '18 at 13:33











            • @bahrep Usually yes, and you are not forced to sync to only place when you want to save/share your changes.

              – kan
              Jan 9 at 15:14



















            • ... and eventually you still have to commit / sync the changes into a centralized Git / DVCS repository in most cases.

              – bahrep
              Nov 26 '18 at 13:33











            • @bahrep Usually yes, and you are not forced to sync to only place when you want to save/share your changes.

              – kan
              Jan 9 at 15:14

















            ... and eventually you still have to commit / sync the changes into a centralized Git / DVCS repository in most cases.

            – bahrep
            Nov 26 '18 at 13:33





            ... and eventually you still have to commit / sync the changes into a centralized Git / DVCS repository in most cases.

            – bahrep
            Nov 26 '18 at 13:33













            @bahrep Usually yes, and you are not forced to sync to only place when you want to save/share your changes.

            – kan
            Jan 9 at 15:14





            @bahrep Usually yes, and you are not forced to sync to only place when you want to save/share your changes.

            – kan
            Jan 9 at 15:14


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • 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%2fstackoverflow.com%2fquestions%2f53479020%2ftracking-changes-svn-vs-git%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

            Wiesbaden

            Marschland

            Dieringhausen