1.查看本地項(xiàng)目多出哪些文件,在終端中輸入下面命令
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)
//下面的內(nèi)容就是多出來(lái)的文件
.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.將代碼先提交到本地的倉(cāng)庫(kù)
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