1.查看本地项目多出哪些文件,在终端中输入下面命令
git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README.md
Untracked files:
(use "git add <file>..." to include in what will be committed)
//下面的内容就是多出来的文件
.babelrc
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.postcssrc.js
build/
config/
index.html
package.json
src/
static/
test/
no changes added to commit (use "git add" and/or "git commit -a")
2.将代码先提交到本地的仓库
git add .
3.将代码commit一下
git commit -m '这里是备注信息'
4.讲代码上传
git push
5.git pull 和git checkout
6.合并分支和主干
git checkout master,切到主干
git merge origin/index-recommend,合并‘index-recommend’分支
git push
网友评论