3

私は 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) diff を実行する ...

$ 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で自分のレポを確認し ますが、変更が表示されません。私はここに私のgit設定があります...

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

...私は何を間違っていますか?

ありがとう!

4

1 に答える 1

5

その変更をリポジトリのローカルクローンにコミットしました。

そのコミットを GitHub で見たい場合は、git pushまずそこに行く必要があります。

于 2013-02-10T18:09:24.240 に答える