git push says everything up to date when it definitely is not

时间秒杀一切 提交于 2019-12-02 23:10:24

Try

git config push.default tracking

http://git-scm.com/docs/git-config :

push.default

Defines the action git push should take if no refspec is given on the command line, no refspec is configured in the remote, and no refspec is implied by any of the options given on the command line. Possible values are:

* nothing - do not push anything.
* matching - push all matching branches. All branches having the same name in both ends are considered to be matching. This is the default.
* upstream - push the current branch to its upstream branch.
* tracking - deprecated synonym for upstream.
* current - push the current branch to a branch of the same name.

EDIT: This it seems is not the correct solution, see the comments to the question. I am leaving the answer because the git add rather than git commit -a hint might help someone in the future.

Hello, did you add before you commited? something like

git add .

(don't forget the dot)

before the

git commit -m "what you changed"

(I find this site useful for getting going - http://gitref.org/remotes/#push)

Use

git push upstream yourlocalbranch:master

where yourlocalbranch could be master (which probably would be your local copy of origin master) or any other branch. If unsure use --verbose and --dry-run options.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!