我使用git有一些奇怪的问题。我已添加并提交了更改。但是,当推向远程回购:我被告知一切都是最新的,但事实并非如此。我试图遵循征兆here,但它仍然没有工作,似乎我不得不处理一个分离的头。 (有关信息,我正在处理的分支用于推动单独的遥控器)。有人有想法吗?Git推送失败,因为一切都是最新的
1
A
回答
1
看来您需要指定远程的名称,以便推送您的更改。
即在.git/config
它应该是这样的:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ssh://git.company-repo.com/repo.git
[branch "master"]
remote = origin
merge = refs/heads/master
+0
其实我用git remote set-head origin mybranch然后我跟着这个http://stackoverflow.com/questions/999907/git-push-says-everything-up-to-date-even-though-i-have - 本地更改,它的工作! – Newben
1
git remote -v
查看输出用于在其中,例如具有链路(推)
origin [email protected]:username/repo_name.git (fetch)
origin [email protected]:username/repo_name.git (push)
如果不是这种情况,就需要通过执行以下命令来远程添加:
git remote add [repo_name] [email protected]:username/repo_name.git
然后尝试git pull
相关问题
- 1. git push说一切都是最新的
- 2. git说一切都是最新的
- 3. Git推送失败
- 4. git不会推送到远程分支“一切都是最新的”
- 5. 推到Git,一切都消失了?
- 6. Gitlab-git推送失败
- 7. Git http推送失败
- 8. Git推送随机失败
- 9. TypeError:undefined不是对象 - git推送失败
- 10. Git GC后Git Push说“一切都是最新的”
- 11. 当试图推送到全新的远程时,全新的git repo显示“一切都是最新的”
- 12. git:'http-push'不是git命令。致命:GIT-HTTP推送失败
- 13. 分叉库中的Git推送失败
- 14. 没有冲突的git推送失败
- 15. 无法将CSS更改推送到origin/master ..一切都是最新的
- 16. Git push将不会做任何事(一切都是最新的)
- 17. git push falsely声称'一切都是最新的'
- 18. 在推推动GIT失败,现在说最新
- 19. Heroku一切都是最新的
- 20. Laravel 5.0 git推送失败openshift
- 21. git推送身份验证失败
- 22. Git远程服务器推送失败
- 23. hg-git默默推送失败
- 24. git说当把更改推送到远程分支时,一切都是最新的
- 25. git推送失败'不修改合并不是你所做的'推送到gerrit
- 26. Git通过SSH推送失败,在Visual Studio 2017中失败
- 27. git推送失败:RPC失败;结果= 22,HTTP代码= 411
- 28. Git推送失败:RPC失败;结果= 22,HTTP代码= 413
- 29. 推失败的git:'凭证缓存'不是一个git命令
- 30. 所有东西都是最新的(一切都不是)
你指定远程服务器推送到?例如'git push remoterepo master',其中'remoterepo'是远程仓库的名称,'master'是你想推送的分支的名称。 – btel
当然,我做到了! – Newben