Week1

Git, Website & Program manager

Git

Git is a Version Control Software and it can working without network (That is a big thing !). I didn’t have any concept of VC system before so it’s pretty new for me.
For my opinion the Version Control is like a “save/load” function or archived system for the programer. When you messed up, git can get it back to anything happen before. (Wish this could happen in our real life) Many other function of Git is base on this “save/load” function.

  • branch : Create an other version project (For Develop projects with your friends or generate a new idea )

  • git clone: Download online projects to your local computer.
    git init & git remote: init is to set up your file path, usually doing once. git remote is to set up your cloud path.

I learning git by the following links:

Chinese version:
1 Git常用指令 - git Command list !
2 Git入门 - get start with git.

English version:
1 Git Book - git book
2 Instructions - Fab Academy 2016 Archive Instructions

Setting up GIT repository

I am listing few steps to setup my GIT repository

Step 1 : Install GIT

I have installed git long time ago, So I just checked the version by

$ git --version

Step 2 : Get up my local identity

$ git config --global user.name Dian33

$ git config --global user.email makerpapa_dian@163.com

Step 3 : Generate SSH key

We need to tell gitlab who I am. So an SSH key allows me to establish a secure connection between my computer and GitLab.

1.Generate a new SSH key, use the following command:

$ ssh-keygen -t rsa -C "your.email@example.com"

This command will prompt you for a location and filename to store the key pair and for a password. When prompted for the location and filename, just press enter (3 times) to use the default. If you use a different name, the key will not be used automatically.

2.Use the command below to show your public key:

$ cat ~/.ssh/id_rsa.pub

or

$ vi ~/.ssh/id_rsa.pub

3.Copy: section under the ‘SSH’ tab in your user profile.

Copy the complete key starting with ssh-rsa and ending with your username and host.

Step 4 : Creat a local folder & Initialize GIT

$ mkdir Dian_Song_Archive

$ git init

Now we create a local folder and this folder will be in sync with my git account. Let's cloning our GIT repository in our new foler

Step 5 : Cloning GIT Repository

$ cd Dian_Song_Archive

$ git clone "http:// your git link from the gitlab"

Step 6 : Check Status

Check what we change on local folder

$ cd Dian_Song_Archive

$ git status

Step 7 : Update your local files to gitlab repository

This command will add all the new files to the repository

$ cd Dian_Song_Archive

$ git add *

This command will bring the Update files to the staging area. In this case it's my "week_01.html" files

$ git commit -m "update my week_01 pages"

This command will push the data from my local repository to GIT repository

$ git push origin master"

Some time you need $ git pull to fetch data from GIT before you $ git add *

Make my website display on the Fab academy student page

Add ".gitlab-ci.yml" file

First make sure you have a "index.html" file as homepage in your gitlab repository, than add a ".gitlab-ci.yml" file by Choose a template type & apply a template

About my WebSite

I use bootstraps template to develop my website. download from this link

40 个超棒的免费 Bootstrap HTML5 网站模板: - 40 Bootstrap template for free.
I choose “04 worthy”

Then the editor I am using is Atom, an open source platform. You can hack it if you like. Change the outlook, or add some functions.

Following those command, and update my wibsite to gitlab repository.

$ cd Dian_Song_Archive

$ git add *

$ git commit -m "update my website"

$ git push origin master