我想创建另一个分支“ServerSR”,但最终我得到了‘--没有什么可提交的,工作目录是干净的’。
下面是我在终端中执行的命令:
首先输入..$ git状态
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: .babelrc
new file: _public/css/bootstrap.min.css
... 然后我输入了..$ git添加-A .和
..$ git状态
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: .babelrc
modified: _public/bundle.js
...然后..$ git签出-b ServerSR
M .babelrc
M _public/bundle.js
...
Switched to a new branch 'ServerSR' 在那之后,..。$ git提交-m 'SSR'
[ServerSR 529eefa] SSR
33 files changed, 142 insertions(+), 152 deletions(-)
rewrite _public/bundle.js (85%)
create mode 100644 _public/css/bootstrap.min.css
...最后,命令.@.$ git push返回me:
Everything up-to-date 所以它没有推动任何事情。
发布于 2017-02-28 21:09:54
使用git push -u origin <branch_name>
目前的情况是:git push -u origin ServerSR
更一般的空壳:
git push -u origin `git symbolic-ref --short -q HEAD`发布于 2017-11-07 21:38:13
我不是git的专家。但当我遇到这样的反应时,我就是这样做的,它对我起了作用。
检查.git文件
ls -a删除.git文件
rm -rf .git现在初始化git。
git init 和
git add .因此,基本上,我删除了现有的Git回购,并重新开始。
https://stackoverflow.com/questions/42518510
复制相似问题