Manual GitLab: Difference between revisions

From HPCwiki
Jump to navigation Jump to search
(Created page with "Manual GitLab: Create projects and add files ## This shows an example, step by step, to create a project and add files into that project. 1. Configuration: Create a folder i...")
 
No edit summary
Line 1: Line 1:
Manual GitLab: Create projects and add files ##
Manual GitLab: Create projects and add files
This shows an example, step by step, to create a project and add files into that project.


1. Configuration:
<source lang='bash'>


Create a folder in your machine:
## This shows an example, step by step, to create a project and add files into that project.
/home/juanma/Git_Stuff


configuration step 1: Copy into that folder the commands from the git-web: https://git.wageningenur.nl/  and then ABGC_Genomics/
## Configuration:


cd /home/juanma/Git_Stuff
# 1. Create a folder in your machine:
git config --global user.name "Herrero Medrano, Juan"
/home/juanma/Git_Stuff
git config --global user.email "juan.herreromedrano@wur.nl"


configuration step 2:
# 2. configuration step 1: Copy into that folder the commands from the git-web: https://git.wageningenur.nl/  # and then ABGC_Genomics/


cd /home/juanma/Git_Stuff
cd /home/juanma/Git_Stuff
ssh-keygen -t rsa
git config --global user.name "Herrero Medrano, Juan"
cd /home/juanma/.ssh/
git config --global user.email "juan.herreromedrano@wur.nl"
cat id_rsa.pub


Copy the code and go to the git-web: Profile settings -> SSH Keys. Paste the code and add key.  
# 3. configuration step 2:
configuration step 3: Go back to the terminal:  
cd /home/juanma/Git_Stuff
ssh-keygen -t rsa
cd /home/juanma/.ssh/
cat id_rsa.pub
# Copy the code and go to the git-web: Profile settings -> SSH Keys. Paste the code and add key.  
# Go back to the terminal:  
git clone git@git.wageningenur.nl:ABGC_Genomics/Turkey_Association.git
# Once I have made this connection, my project will appear as a folder in /home/juanma/Git_Stuff


git clone git@git.wageningenur.nl:ABGC_Genomics/Turkey_Association.git


Once I have made this connection, my project will appear as a folder in /home/juanma/Git_Stuff
## Add files:
 
# Add scripts to the project "Turkey_Association" :
 
cd /home/juanma/Git_Stuff/Turkey_Association
2. Add files:
cp myscript.sh /home/juanma/Git_Stuff/Turkey_Association
Add scripts to the project "Turkey_Association" :
git add myscript.sh
cd /home/juanma/Git_Stuff/Turkey_Association
git commit -m "myfirst_commit"
cp myscript.sh /home/juanma/Git_Stuff/Turkey_Association
git push origin master
git add myscript.sh
git commit -m "myfirst_commit"
git push origin master

Revision as of 13:16, 25 March 2015

Manual GitLab: Create projects and add files

<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:

/home/juanma/Git_Stuff

  1. 2. configuration step 1: Copy into that folder the commands from the git-web: https://git.wageningenur.nl/ # and then ABGC_Genomics/

cd /home/juanma/Git_Stuff git config --global user.name "Herrero Medrano, Juan" git config --global user.email "juan.herreromedrano@wur.nl"

  1. 3. configuration step 2:

cd /home/juanma/Git_Stuff ssh-keygen -t rsa cd /home/juanma/.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. Go back to the terminal:

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 /home/juanma/Git_Stuff


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

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