git push nothing to commit, working tree clean

Posted 修炼之路

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git push nothing to commit, working tree clean相关的知识,希望对你有一定的参考价值。

错误原因

在使用git push的时候报Your branch is up to date with ‘origin/master’. nothing to commit, working tree clean

解决办法

  1. rm -rf .git/
  2. git init
  3. git remote add origin https://repository.remote.url(地址改成你git clone的地址)
  4. git commit -m “Commit message”
  5. git push -f origin master

以上是关于git push nothing to commit, working tree clean的主要内容,如果未能解决你的问题,请参考以下文章

git提交出现Another git process seems to be running in this repositorye.g. an editor opened by ‘git commi

nothing added to commit but untracked files present (use“git add“to track)

git报错-Initial commit Untracked files nothing added to commit but untracked

git基础教程回退还没push的commit--git reset

GIT用git push出现failed to push some refs to git...的解决方法

git push 报错:failed to push some refs to 'git@git.xxxx:devops/thor.git'