Przeglądaj źródła

add git tutorial

Jeremy Zheng 1 tydzień temu
rodzic
commit
f825af1134

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+/.vscode/
+/tmp/

+ 36 - 1
README.md

@@ -1,2 +1,37 @@
-# tutorial
+# 闲人指路
 
+## 创建用户
+
+## 克隆项目
+
+- 下载并安装[git for windows](softwares/windows/Git-2.53.0.2-64-bit.exe)
+- 打开git bash: 右键点击工作目录选择“Git Bash Here”
+- 获得项目地址
+
+  ![Clone by https](images/git/repo-url.png)
+
+### 通过密码(HTTPS)
+
+```bash
+git clone https://git.wikipali.org/iapt-platform/tutorial.git
+```
+
+### 无密码(SSH)
+
+- 创建ssh key
+
+  ```bash
+  mkdir .ssh
+  ssh-keygen -t rsa -f .ssh/id_rsa -b 4096 -C "你的邮箱"
+  ```
+
+- 把`.ssh/id_rsa.pub`内容添加到你的账户
+  ![step 1](images/git/add-keys/1.png)
+  ![step 2](images/git/add-keys/2.png)
+- 克隆项目
+
+  ```bash
+  eval "$(ssh-agent -s)"
+  ssh-add .ssh/id_rsa
+  git clone ssh://git@git.wikipali.org:2222/iapt-platform/tutorial.git
+  ```

BIN
images/git/add-keys/1.png


BIN
images/git/add-keys/2.png


BIN
images/git/repo-url.png


BIN
softwares/windows/Git-2.53.0.2-64-bit.exe