|
@@ -1,43 +1,43 @@
|
|
|
-#### 【Git 快速帮助】
|
|
|
-
|
|
|
-
|
|
|
-##### 1 配置git用户名及邮箱告诉他我是谁
|
|
|
-
|
|
|
-```
|
|
|
-git config --global user.name "test"
|
|
|
-git config --global user.email "test@qq.com"
|
|
|
-```
|
|
|
-
|
|
|
-##### 2 免密钥登陆配置
|
|
|
-
|
|
|
-```
|
|
|
-打开cmd ---进入bash shell执行
|
|
|
-ssh-keygen -C '用户名'; #生成密钥
|
|
|
-cat ~/.ssh/id_rsa.pub #看密钥并复制密钥粘贴至--gogs-->用户设置---ssh密钥--增加密钥 完成后保存退出。
|
|
|
-```
|
|
|
-
|
|
|
-##### 3 克隆当前仓库
|
|
|
-
|
|
|
-```
|
|
|
-touch README.md
|
|
|
-git init
|
|
|
-git add README.md
|
|
|
-git commit -m "first commit"
|
|
|
-git remote add origin root@git.mintelcn.com:Minte-development/Test-project.git
|
|
|
-git push origin master --force
|
|
|
-# --force 表示强制本地覆盖线上
|
|
|
-```
|
|
|
-
|
|
|
-##### 4 从命令行推送已经创建的仓库
|
|
|
-
|
|
|
-```
|
|
|
-git remote add origin root@git.mintelcn.com:Minte-development/Test-project.git
|
|
|
-git push origin master --force
|
|
|
-# --force 表示强制本地覆盖线上
|
|
|
-```
|
|
|
-
|
|
|
-##### 5 常用操作汇总表
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-##### 6 更多帮助请移步[Git](https://git-scm.com/book/zh/v2)
|
|
|
+#### 【Git 快速帮助】
|
|
|
+
|
|
|
+
|
|
|
+##### 1 配置g it用户名及邮箱告诉他我是谁
|
|
|
+
|
|
|
+```
|
|
|
+git config --global user.name "test"
|
|
|
+git config --global user.email "test@qq.com"
|
|
|
+```
|
|
|
+
|
|
|
+##### 2 免密钥登陆配置
|
|
|
+
|
|
|
+```
|
|
|
+打开cmd ---进入bash shell执行
|
|
|
+ssh-keygen -C '用户名'; #生成密钥
|
|
|
+cat ~/.ssh/id_rsa.pub #看密钥并复制密钥粘贴至--gogs-->用户设置---ssh密钥--增加密钥 完成后保存退出。
|
|
|
+```
|
|
|
+
|
|
|
+##### 3 克隆当前仓库
|
|
|
+
|
|
|
+```
|
|
|
+touch README.md
|
|
|
+git init
|
|
|
+git add README.md
|
|
|
+git commit -m "first commit"
|
|
|
+git remote add origin root@git.mintelcn.com:Minte-development/Test-project.git
|
|
|
+git push origin master --force
|
|
|
+# --force 表示强制本地覆盖线上
|
|
|
+```
|
|
|
+
|
|
|
+##### 4 从命令行推送已经创建的仓库
|
|
|
+
|
|
|
+```
|
|
|
+git remote add origin root@git.mintelcn.com:Minte-development/Test-project.git
|
|
|
+git push origin master --force
|
|
|
+# --force 表示强制本地覆盖线上
|
|
|
+```
|
|
|
+
|
|
|
+##### 5 常用操作汇总表
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+##### 6 更多帮助请移步[Git](https://git-scm.com/book/zh/v2)
|