Changes between Initial Version and Version 1 of cypress/git


Ignore:
Timestamp:
08/14/15 17:52:29 (9 years ago)
Author:
fuji
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/git

    v1 v1  
     1= Version Control with ''git'' =
     2
     3Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
     4
     5To use git on Cypress, you have to load module. It is better to set this in ''.modulerc''
     6{{{#!bash
     7[fuji@cypress2 workshop]$ module load git
     8}}}
     9
     10== Create a project repository ==
     11On your project directory, for example, (replace dpg with your project folder name)
     12{{{#!bash
     13[fuji@cypress2 ~]$ cd /lustre/project/dpg
     14[fuji@cypress2 dpg]$ mkdir repos
     15[fuji@cypress2 dpg]$ cd repos
     16[fuji@cypress2 repos]$ mkdir git
     17[fuji@cypress2 repos]$ cd git
     18[fuji@cypress2 git]$ mkdir projectX
     19[fuji@cypress2 git]$ cd projectX
     20[fuji@cypress2 projectX]$ git init
     21Initialized empty Git repository in /lustre/project/dpg/repos/git/projectX/.git/
     22}}}
     23
     24Add a file and commit
     25{{{#!bash
     26[fuji@cypress2 projectX]$ echo "This is README.txt for my git-repo" > README.txt
     27[fuji@cypress2 projectX]$ git add README.txt
     28[fuji@cypress2 projectX]$ git commit -m"first commit"
     29[master (root-commit) 4fe9eae] first commit
     30 Committer: Hideki Fujioka <fuji@cypress2.cm.cluster>
     31Your name and email address were configured automatically based
     32on your username and hostname. Please check that they are accurate.
     33You can suppress this message by setting them explicitly. Run the
     34following command and follow the instructions in your editor to edit
     35your configuration file:
     36
     37    git config --global --edit
     38
     39After doing this, you may fix the identity used for this commit with:
     40
     41    git commit --amend --reset-author
     42
     43 1 file changed, 1 insertion(+)
     44 create mode 100644 README.txt
     45}}}
     46
     47Make a clone repository on Cypress,
     48{{{#!bash
     49[fuji@cypress2 ~]$ git clone file:///lustre/project/dpg/repos/git/projectX
     50Cloning into 'projectX'...
     51remote: Counting objects: 3, done.
     52remote: Total 3 (delta 0), reused 0 (delta 0)
     53Receiving objects: 100% (3/3), done.
     54Checking connectivity... done.
     55[fuji@cypress2 ~]$ ls
     56projectX
     57}}}
     58
     59Make a clone repository over network, (you may have to type password)
     60{{{#!bash
     61Hideki02:~ fuji$ git clone fuji@cypress1.tulane.edu:/lustre/project/dpg/repos/git/projectX
     62Cloning into 'projectX'...
     63remote: Counting objects: 3, done.
     64remote: Total 3 (delta 0), reused 0 (delta 0)
     65Receiving objects: 100% (3/3), done.
     66Checking connectivity... done.
     67Hideki02:~ fuji$ ls
     68projectX
     69}}}
     70Since git is not a default module on Cypress, you have to set '''~/.modulerc''' like:
     71{{{#!bash
     72#%Module3.2.10
     73module load git
     74}}}