上面会有一个报错
如果报上买面的化,需要把项目先放入暂存区,
1,git add .存放暂存区
2,然后查看一下工作区 git status
出现下面这些绿色的,说明添加到了暂存区
不能直接push远程仓库,需要先提交到本地仓库中,然后在push远程仓库
1,git commit -m "state",
2,出现白色的说明已提交到本地仓库中了
1,git checkout master //切换主分支
2,git status 查看状态
3.git push 然后就成功push到远程仓库了
PS D:\flutte\flutter_application_5> git checkout master
PS D:\flutter\flutter_application_5> git status
On branch master
nothing to commit, working tree clean
PS D:\flutter\flutter_application_5> git push
fatal: The current branch master has no upstream branch.
git push --set-upstream origin master
PS D:\flutter\flutter_application_5> git push --set-upstream origin master
Counting objects: 100% (101/101), done.
Delta compression using up to 8 threads
Compressing objects: 100% (80/80), done.
Writing objects: 100% (101/101), 67.25 KiB | 1.32 MiB/s, done.
Total 101 (delta 6), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (6/6), done.
remote: Powered by GITEE.COM [GNK-6.2]
To https://gitee.com/yan-ghe/flutter.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
PS D:\flutter\flutter_application_5> git push master
fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.
下面的是切换添加分支合并分支