gpt4 book ai didi

GIT - 推送到 (GitHub) origin master 什么都不做

转载 作者:IT王子 更新时间:2023-10-29 01:28:09 26 4
gpt4 key购买 nike

我 fork 了某人的 GIT 存储库:

https://github.com/nippysaurus/toodledo-objc

将它克隆到我的本地机器,显示带有以下信息的来源:

* remote origin
Fetch URL: https://nippysaurus@github.com/nippysaurus/toodledo-objc.git
Push URL: https://nippysaurus@github.com/nippysaurus/toodledo-objc.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)

当我将我的更改推送到“origin master”时,git 打印“所有内容都是最新的”,但它在我的 GitHub 存储库中没有任何更新。

这是怎么回事?

编辑:

有人建议我检查文件是否确实已提交...文件已提交,我向你保证。

commit 0d3a21616d82c8e5a89baaf85d745fc2cfdf614f
Author: nippysaurus <nippysaurus@example.com>
Date: Wed Jun 1 13:19:14 2011 +1000

updated readme

这是更新后的文件:

commit 0d3a21616d82c8e5a89baaf85d745fc2cfdf614f
Author: nippysaurus <nippysaurus@example.com>
Date: Wed Jun 1 13:19:14 2011 +1000

updated readme

diff --git a/README.mdown b/README.mdown
index fb8ee14..a71aa57 100644
--- a/README.mdown
+++ b/README.mdown
@@ -3,7 +3,7 @@ toodledo-objc

An _unofficial_ toodledo-API implementation in ObjectiveC.

-This library currently uses [version 1.0 of the API](http://www.toodledo.com/info/api_doc.php "Toodledo API 1.0 spec") which has been offic
+This library currently uses [version 1.0 of the API](http://www.toodledo.com/info/api_doc.php "Toodledo API 1.0 spec") which has been offic

Supported:

此外,我可以看到该文件的本地版本与 GitHub 上的版本有很大不同,更改肯定会添加到我的本地仓库,但不会推送到远程仓库。

最佳答案

可能是你在master分支之外的其他分支,那么输入:

git push origin HEAD:master

所以 git 知道你想上推当前的 HEAD 而不是 master 分支。

关于GIT - 推送到 (GitHub) origin master 什么都不做,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6195973/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com