Discuss / Git / 提交未显示提交

提交未显示提交

Topic source

已经将readme文件commit了,当使用git status命令时,为什么会出现“nothing to commit, working tree clean”这样的提示呢

Mr.Wang

#2 Created at ... [Delete] [Delete and Lock User]

因为现在你的git只在本地,还没有远程branch,设置好远程branch后,会有提示:

On branch deploy
Your branch is ahead of 'origin/deploy' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

wahahaha90

#3 Created at ... [Delete] [Delete and Lock User]

请问解决了嘛,最近刚开始学,不太理解

明天你好

#4 Created at ... [Delete] [Delete and Lock User]

你在git commit 之后用git status查看状态,显示:nothing to commit, working tree clean, 就正好说明了当前提交完成了,本地没有新的文件变化,工作树是干净的。


  • 1

Reply