gpt4 book ai didi

git commit 没有出现在 github 中

转载 作者:太空狗 更新时间:2023-10-29 13:56:28 25 4
gpt4 key购买 nike

我是 git newbee,我有一个非常简单的 github 存储库,我想对其进行更改,所以我这样做......

1) 启动“Git Bash”(我在Windows系统上)2) 执行...

$ git clone https://github.com/redcricket/simple_flashlight.git

3) 将我的更改从 eclipse 导出到 simple_flashlight/flashlight/4) cd 到那个...

$ cd simple_flashlight/flashlight/

5) 做一个差异...

$ git diff AndroidManifest.xml
diff --git a/flashlight/AndroidManifest.xml b/flashlight/AndroidManifest.xml
index a57b2c1..59d5fc5 100644
--- a/flashlight/AndroidManifest.xml
+++ b/flashlight/AndroidManifest.xml
@@ -4,6 +4,7 @@
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
+
<!-- Allows access to the flashlight -->
<uses-permission android:name="android.permission.CAMERA"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
@@ -16,7 +17,12 @@


<application android:icon="@drawable/icon" android:label="@string/app_name"
+ <!--
+ - to prevent "flashing" when orientation changes I added the line
+ - android:configChanges="orientation"
+ -->
<activity android:name=".FlashlightActivity"
+ android:configChanges="orientation"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
warning: LF will be replaced by CRLF in flashlight/AndroidManifest.xml.
The file will have its original line endings in your working directory.

6) 我做“分期”……我想……通过这样做……

$ git add AndroidManifest.xml
warning: LF will be replaced by CRLF in flashlight/AndroidManifest.xml.
The file will have its original line endings in your working directory.
$ git status
warning: LF will be replaced by CRLF in flashlight/AndroidManifest.xml.
The file will have its original line endings in your working directory.
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: AndroidManifest.xml
#

7) 像这样做我的提交......

$ git commit -m "do not flash light on orientation change"
[master warning: LF will be replaced by CRLF in flashlight/AndroidManifest.xml.
The file will have its original line endings in your working directory.
361f69b] do not flash light on orientation change
warning: LF will be replaced by CRLF in flashlight/AndroidManifest.xml.
The file will have its original line endings in your working directory.
1 file changed, 6 insertions(+)

然后我去看看我在 https://github.com/redcricket/simple_flashlight/commits/master 中的 repo 协议(protocol)我没有看到我的变化。我这是我的 git 配置...

$ git config --global -l
user.name=redcricket
user.email=red.cricket.blog@gmail.com

...我做错了什么?

谢谢!

最佳答案

您将该更改提交给存储库的本地克隆。

如果您想在 GitHub 上看到该提交,您需要先将它git push 到那里。

关于git commit 没有出现在 github 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14800874/

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