Week02. Project management

In this week, I will learn to manage projects using Git and create websites using a text editor.
I did the work in Windows

1 Preparation for Week2

Install Git for the project.
Also install TortoiseGit to check with GUI.
Install Visual Studio Code for text editing.

1-1 Install applications

Installation will be done according to the directions of the official website.

2 Setup

Set SSH key to use Git.
Then use GitBash to clone the repository.

2-1 Generate SSH key

  1. Start a Command Prompt
  2. Run SSHkey generator.
    • Enter the following command
      ssh-keygen
  3. Setting SSH key
    • Fill in the following question
      Enter file in which to save the key (C:\Users\%UserName%/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again:
  4. Copy contents of public key to clipboard
    • Enter the following command
      • folder path that saved the key
        clip < C:\Users\%UserName%/.ssh/id_rsa.pub

2-2 Set SSH key with GitLab

  1. Start a any Web Browser
  2. Move to GitLab’s SSH key setting screen
  3. Paste your public SSH key…
    • In the (2-1 step 4) you copy the key
  4. Enter Title
    • A meaningful name
  5. Click [Add Key] Button

2-3 Cloning git Repository

  1. Start a Git Bash
  2. Check current folder
    • Enter the following command
      • There is current folder
        pwd
  3. Move to an arbitrary folder
    • Enter the following command
      cd %Path%
  4. Cloning Own FabAcademy Repository
    • Enter the following command
      • If you do not know, find your own project from here
        git clone git@gitlab.fabcloud.org:academany/fabacademy/2019/labs/[Your Class Name] /students/[Your Name].git
  5. Check Created Clone Repository
    • Enter the following command
      ls

2-4 Edit Documents

  1. Start a Visual Studio Code
  2. Open Project Folder
    • Press [Ctrl + K] → [Ctrl + O]
  3. Select Project Folder
    • The folder cloned in the (2-3 step 4)
  4. Open the file to want Edit
    • Open Week01.md
  5. Preview Markdown File
    • Press [Ctrl + K] → [V]
  6. Editing......
    • Do not forget to save

2-5 Push to Repository

  1. Start a Git Bash
    • If you did not close what you opened in (2-3 step 1) still use it
  2. Move to Cloned Repository Folder
    • You know there
  3. Add Change Files to Stage
    • Enter the following command
      git add .
  4. Commit Change Files to Local Repository
    • Enter the following command
      git commit -m "Commit change"
  5. Push Change Files to Remote Repository
    • Enter the following command
      git push
  6. Show project Folder in exproler
  7. Start TortoiseGit
    • Click right mouse button
    • looking for tortoise Git
  8. Show log
    • can see the chenge log

3 Make My Web Site

I will use the configuration prepared in advance as it is.

3-1 Change Theme

  1. Edit mkdocs.yml
    • Change the following settings
      theme: name: readthedocs palette: primary: "Teal" accent: "Red" font: false feature: tabs: true

4 Git practice only local

Practice locally to use Git quickly.
And, as much as possible CUI only.

4-1 Create Remote Repository

  1. Start Git Bash
    • Call ‘RemoteWindow’
  2. Initialize Remote Repository
    • Enter the following command
      git init --bare --shared RemoteRepository
  3. Change Directory
    • Enter the following command
      cd RemoteRepository
  4. Check current directory
    • Enter the following command
      pwd
  5. Copy current directory path
    • Enter the following command
      pwd > /dev/clipboard

Like this
4-1

4-2 Create Local Repository1

  1. Start Git Bash
    • Start separately from the one started in (4-1 step 1)
    • Call ‘LocalWindow’
  2. Cloning Remote Repository
    • Enter the following command. Replace contents of []
      git clone [Paste the copy in step 5] LocalRepository1
  3. Change directory
    • Enter the following command
      cd LocalRepository1
  4. Change username
    • Enter the following command
      git config --local user.name 'localuser1'

Like this
4-2

4-3 Create Local Repository2

  1. Repeat 4-2
    • Name of LocalRepository is LocalRepository2
    • Opened GitBash Call ‘LocalWindow2’
    • username is ‘localuser2’

4-4 Add Contents

  1. First commit in LocalRepository1
    • Enter the following command in ‘LocalWindow’
      echo a > a git add a git commit -m 'firstcommit'
  2. Push to RemoteRepository
    • Enter the following command
      git push
    • If you receive an error, use this command
      git push -u origin master
  3. Check RemoteRepository
    • Enter the following command in ‘RemoteWindow’
      git log

Like this
4-4

4-5 Pull Contents

  1. Pull change in RemoteRepository
    • Enter the following command in ‘LocalWindow2’
      git pull

4-6 Check on GUI

  1. Show in explorer
  2. Show log in TortoiseGit
  3. Line up

Like this
4-6

4-7 Try tutorial and various things

GitTutorial

4-8 Finish

Delete All files