Manual GitLab: Difference between revisions

From HPCwiki
Jump to navigation Jump to search
 
Line 44: Line 44:
git commit -m "myfirst_commit"
git commit -m "myfirst_commit"
git push origin master
git push origin master
## Remove a directory:
git rm -r one-of-the-directories
git commit -m "Remove duplicated directory"
git push origin master
</source>
</source>



Latest revision as of 14:01, 9 April 2015

Manual GitLab@WUR: Create projects and add files

Signing up

If you haven't done so already, install git in your local machine and sign up at GitLab@WUR:

 https://git.wageningenur.nl

Example of local commands to execute

<source lang='bash'>

    1. This shows an example, step by step, to create a project and add files into that project.
    1. Configuration:
  1. 1. Create a folder in your machine, e.g.:

mkdir ~/Git_Stuff

  1. 2. configuration step 1:

git config --global user.name "Herrero Medrano, Juan" git config --global user.email "juan.herreromedrano@wur.nl"

  1. 3. configuration step 2: make private-public rsa key pair

ssh-keygen -t rsa cd ~/.ssh/ cat id_rsa.pub

  1. Copy the code and go to the git-web: Profile settings -> SSH Keys. Paste the code and add key.
  2. IMPORTANT: make sure you use the *public* key, not the private part of the key pair!
  3. The configuration is finished.
    1. Create a project:
  1. 1. Log in https://git.wageningenur.nl. Then create a project (name of the project should not have spaces or dash '-'). In the example, the project is called Turkey_Association
  2. 2. Go back to the terminal:

cd ~/Git_Stuff git clone git@git.wageningenur.nl:ABGC_Genomics/Turkey_Association.git

  1. Once I have made this connection, my project will appear as a folder in ~/Git_Stuff


    1. Add files:
  1. Add scripts to the project "Turkey_Association" :

cp myscript.sh ~/Git_Stuff/Turkey_Association cd ~/Git_Stuff/Turkey_Association git add myscript.sh git commit -m "myfirst_commit" git push origin master


    1. Remove a directory:

git rm -r one-of-the-directories git commit -m "Remove duplicated directory" git push origin master

</source>

See also

Bioinformatics tips, tricks, workflows at ABGC

External links