2021-02-27 15:01:45 +00:00
|
|
|
|
# 原创
|
|
|
|
|
: Git提交本地项目或文件
|
|
|
|
|
|
|
|
|
|
# Git提交本地项目或文件
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
update: 2018-06-05
|
|
|
|
|
|
|
|
|
|
|
2024-07-03 09:49:47 +00:00
|
|
|
|
### 一、基本命令
|
2021-02-27 15:01:45 +00:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
//建立本地仓库
|
|
|
|
|
|
|
|
|
|
//初始化本地仓库
|
|
|
|
|
$ git init
|
|
|
|
|
|
|
|
|
|
//添加到暂存区
|
|
|
|
|
$ git add .
|
|
|
|
|
|
|
|
|
|
//提交到工作区
|
|
|
|
|
$ git commit -m "first commit"
|
|
|
|
|
|
|
|
|
|
//添加远程Git仓库
|
|
|
|
|
$ git remote add origin https://github.com/ds19991999/VerCodeMFC.git
|
|
|
|
|
|
|
|
|
|
//删除远程Git仓库
|
|
|
|
|
$ git remote rm origin
|
|
|
|
|
|
|
|
|
|
//合并pull两个不同的项目解决fatal: refusing to merge unrelated histories
|
|
|
|
|
$ git pull origin master --allow-unrelated-histories
|
|
|
|
|
|
|
|
|
|
//使用强制push的方法:
|
|
|
|
|
$ git push -u origin master -f
|
|
|
|
|
```
|
|
|
|
|
|
2024-07-03 09:49:47 +00:00
|
|
|
|
### 二、常见问题汇总
|
2021-02-27 15:01:45 +00:00
|
|
|
|
|
2024-07-03 09:49:47 +00:00
|
|
|
|
#### 1.出现邮箱限制
|