Manual GitLab: Difference between revisions

From HPCwiki
Jump to navigation Jump to search
Herre011 (talk | contribs)
No edit summary
Megen002 (talk | contribs)
No edit summary
Line 34: Line 34:
git commit -m "myfirst_commit"
git commit -m "myfirst_commit"
git push origin master
git push origin master
</source>

Revision as of 22:16, 26 March 2015

Manual GitLab: Create projects and add files

## This shows an example, step by step, to create a project and add files into that project.

## Configuration:

# 1. Create a folder in your machine:
/home/juanma/Git_Stuff

# 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"

# 3. configuration step 2:
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


## Add files:
# 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