Fab Academy 1

Website creation / Version control

INDEX:

Here you will find an Index with links to easily navigate through the section content.

1

Intro:

The process for creating a website.

2

GitLab Version Control:

A little explanation about what is GitLab and version control.

3

Create your account in GitLab.com, and then register a New Username.
In this case, I´m using "NAME.SURNAME" format and my email.

Add Git username:
git config –-global user.name “YOUR_USERNAME"

Configure email for uploading:
git config -–global user.email “username@mail.com”

Check if you have SSH KEY:
cat ~/.ssh/id_rsa.pub
(If you see a long string starting with ssh-rsa, you can skip the ssh-keygen step)


Generate SSH key:
ssh-keygen -t rsa -C "$your_email"

Check keygen:
cat ~/.ssh/id_rsa.pub

Copy your key:
pbcopy < ~/.ssh/id_rsa.pub

On your GitLab main page, on the right side, you will have a blue "CLONE" button.
Click it and select "Clone with SSH", and copy the URL.

It should look something like this:
git@gitlab.com:FOLDER_NAME/REPOSITORY_NAME.git

Create a folder in your computer where you are going to save your webpage.
A good tip is not to put it in a folder to deep into your computer, so the navigation through terminal is easier.

In the terminal, navigate to he folder, and use the next command to clone your repository to it:
git clone git@gitlab.com:GIT_FOLDER_NAME/GIT_REPOSITORY_NAME.git

While being inside of the folder, using the following commands:

ADD the new files you added to git
git add filename.extension (to upload file by file)
git add . (to upload all the files at once)


DOWNLOAD the last copy from the repository
git pull

MERGE to have a working copy of your repository
git merge

NAME the update you are pushing with the changes you did
git commit -m ‘UPDATE_NAME’ (the changes you are committing)

UPLOAD to the Repository
git push

Voltio