|
@@ -29,41 +29,7 @@ git push origin master --force
|
|
|
```
|
|
|
|
|
|
#### * 从命令行推送已经创建的仓库
|
|
|
-```
|
|
|
-git remote add origin root@git.mintelcn.com:Minte-development/Test-project.git
|
|
|
-git push origin master --force
|
|
|
-# --force 表示强制本地覆盖线上
|
|
|
-```### [ GIT 快速帮助 ]
|
|
|
|
|
|
-#### * 配置git用户名及邮箱告诉他我是谁
|
|
|
-
|
|
|
-```
|
|
|
-git config --global user.name ‘test'
|
|
|
-git config --global user.email ‘test@qq.com’
|
|
|
-
|
|
|
-```
|
|
|
-
|
|
|
-#### * 免密钥登陆配置
|
|
|
-
|
|
|
-```
|
|
|
-打开cmd ---进入bash shell执行
|
|
|
-ssh-keygen -C '用户名'; #生成密钥
|
|
|
-cat ~/.ssh/id_rsa.pub #看密钥并复制密钥粘贴至--gogs-->用户设置---ssh密钥--增加密钥 完成后保存退出。
|
|
|
-```
|
|
|
-
|
|
|
-#### * 克隆当前仓库
|
|
|
-
|
|
|
-```
|
|
|
-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 表示强制本地覆盖线上
|
|
|
-```
|
|
|
-
|
|
|
-#### * 从命令行推送已经创建的仓库
|
|
|
```
|
|
|
git remote add origin root@git.mintelcn.com:Minte-development/Test-project.git
|
|
|
git push origin master --force
|