Changes between Version 2 and Version 3 of Doc/SCDB/Git


Ignore:
Timestamp:
Jan 19, 2010, 7:47:47 PM (16 years ago)
Author:
/O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=Michel Jouvin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/SCDB/Git

    v2 v3  
    88== Why Git? ==
    99
    10 [http://git-scm.com Git] is one of the new generation ''Version Control System'' (VCS). It belongs to the family of ''Distributed VCS''. Compared to SVN, based on the ''Centralized VCS'' paradygm, each user has its own copy of the full repository (''clone'') instead of a working copy of only one revision of the central repository. In fact, in the DVCS model, there is no need of a central repository, this is just a project decision. All users exchange their contributions through ''fetch'' and ''pull'' operations.
     10[http://git-scm.com Git] is one of the new generation ''Version Control System'' (VCS). It belongs to the family of ''Distributed VCS''. Compared to SVN, based on the ''Centralized VCS'' paradigm, each user has its own copy of the full repository (''clone'') instead of a working copy of only one revision of the central repository. In fact, in the DVCS model, there is no need of a central repository, this is just a project decision. All users exchange their contributions through ''fetch'' and ''pull'' operations.
    1111
    1212DVCS model is very attractive as a complementary tool to SCDB for the following reasons:
     
    1616 * Some DVCS, like [http://git-scm.com Git], allows to easily pack together a set of revision into only one. This allows to keep a cleaner history in main branches when doing incremental development.
    1717
    18 A feature present in many DVCS is the ability to be used to mirror a SVN central repository and act as a replacement of the SVN working copy. One command allows bi-directional synchronisation between SVN and the DVCS repository. In [http://git-scm.com Git], this is provided by `git svn` command.
     18A feature present in many DVCS is the ability to be used to mirror a SVN central repository and act as a replacement of the SVN working copy. One command allows bi-directional synchronization between SVN and the DVCS repository. In [http://git-scm.com Git], this is provided by `git svn` command.
    1919 
    2020== SCDB and SVN ==
     
    6363== Using Git for Everyday Operations == #GitEveryDay
    6464
    65 After [#GitMirror setting up] the initial Git repository as a mirror of your SVN configuration database, you can use all [http://git-scm.com Git] commands and features, in particular ''branche'' and ''merge''.
     65After [#GitMirror setting up] the initial Git repository as a mirror of your SVN configuration database, you can use all [http://git-scm.com Git] commands and features, in particular ''branch'' and ''merge''.
    6666
    67 As mentioned [#GitMirror above], the main restriction is that all synchronisation has to be done from the `master` branch. This is not a strict requirement and there is no way to enforce it. The reason for this is to avoid potential issues with Git `rebase` operations (history rewritting), something that cannot be implemented with SVN. Because of this restriction, you '''must avoid''' doing a `rebase` in the `master` branch, in particular any `rebase` that may impact revisions already committed in SVN.
     67As mentioned [#GitMirror above], the main restriction is that all synchronization has to be done from the `master` branch. This is not a strict requirement and there is no way to enforce it. The reason for this is to avoid potential issues with Git `rebase` operations (history rewriting), something that cannot be implemented with SVN. Because of this restriction, you '''must avoid''' doing a `rebase` in the `master` branch, in particular any `rebase` that may impact revisions already committed in SVN.
    6868
    6969Another restriction is that you should not clone the Git mirror, except for very special purposes: `git svn` will not work properly on such a clone. Instead create another [#GitMirror mirror] of the SVN repository using `git svn clone`.
     
    7171If you are new to [http://git-scm.com Git], you may want to read the [http://git.or.cz/course/svn.html GIT - SVN Crash Course] that introduces Git concepts and commands for people familiar with SVN. You need to be aware of the following important differences in the way [http://git-scm.com Git] tracks changes compared to SVN:
    7272 * Output of commands like `git status` is formatted very differently from  `svn status`. On the other hand, [http://git-scm.com Git] always provides the most sensible commands to use in a given state of the Git working copy.
    73  * No tracking of directory per-se: directory are tracked (including renames) only a part of the tracking of the files they contain. That means that empty directory existing in the SVN repository will not be created in the Git mirror. This should generally not be a problem. Note that this behaviour is common to many DVCS.
     73 * No tracking of directory per-se: directory are tracked (including renames) only a part of the tracking of the files they contain. That means that empty directory existing in the SVN repository will not be created in the Git mirror. This should generally not be a problem. Note that this behavior is common to many DVCS.
    7474 * There is no `git cp` command and `git mv` is basically the same as standard `mv`. This comes from the way [http://git-scm.com Git] tracks history (based on ''content changes'' and not on files): in fact [http://git-scm.com Git] achieves the same result as `svn cp/rm/mv` using the standard shell commands...
    7575 * In [http://git-scm.com Git], changes to tracked files are not automatically added to the next commit. For them to be part of the next commit, you need to use `git add` (with `-A` option to add everything) or `git commit -a`. This is a little bit disturbing at the beginning but when used to this, this is in fact very handy. `git status` is very explicity about what will be part or not of the next commit.