git push 提示 Everything up-to-date

原文链接:
http://blog.rexzhao.com/2011/11/28/google-code-git-everything-up-to-date-when-push.html

 

Why does Git refuse to push, saying “everything up to date”?
git push with no additional arguments only pushes branches that exist in the remote already. 
If the remote repository is empty, nothing will be pushed. 
In this case, explicitly specify a branch to push, e.g. git push master.

也就是说一开始 git 服务器仓库是完全空的,
不包含任何一个分支(branch),因此刚开始 Push 时需要指定一个。
执行 git remote -v 后看到自己的 remote 端名字为 origin:

 
  1. $ git remote -v

  2. origin https://code.google.com/p/micolog2 (fetch)

  3. origin https://code.google.com/p/micolog2 (push)

执行 git branch 后看到自己当下用的分支是 master:

 
  1. $ git branch

  2. * master

因此在本地 commit 后,再执行 git push origin master 即可。

转载自:http://yang3wei.github.io/blog/2013/02/01/git-why-everything-up-to-date-when-pushing/

 

--------------------------------------------------------------------------------------------

可以试一试,我不确定管不管用。不过在执行 git push origin master 前 一定要注意

执行 git add       与   git  commit -m " "  !!!,否则会造成这种错误

--------------------- 本文来自 Richard_J 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/jiangnan_java/article/details/21192675?utm_source=copy

你可能感兴趣的:(git)