git で非常に奇妙な問題が発生しています。runit 管理下のサーバーで Ruby アプリを実行しています。このアプリには自動更新機能があります。git ls-remote
プルとサービスの再起動が必要かどうかを確認するために実行されます。この部分は正常に動作し、スタッフが実行され、ファイルがプルされますが、プル後、プルされたすべての変更は に残り"changes not staged for commit"
ます。レポの実行後git reset --hard
、コミットのためにステージングされた変更はありませんが、レポのローカル コピーはorigin/branch
X コミットよりも進んでいることを示しています。
この問題が発生する理由と、問題を解決する方法がわかりません。誰かが似たようなことを経験したことがありますか?任意のポインタをいただければ幸いです。
ソフトウェアは、root (root として実行される runit) として単純化するために、Ubuntu 12.04、ruby 1.9.3p448 で実行されます。ファイルには適切なパーミッションがあります。少なくとも、そのように見えます。
コードはここで見ることができます: https://github.com/radekg/rgossip_app/blob/dev/lib/updater.rbgit pull
git fetch
git reset
*更新:*
git status
戻り値:
root@ip-10-222-29-69:/opt/rgossip# git status
# On branch dev
# Your branch is ahead of 'origin/dev' by 1 commit.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: README.md
#
no changes added to commit (use "git add" and/or "git commit -a")
git diff
:
root@ip-10-222-29-69:/opt/rgossip# git diff
diff --git a/README.md b/README.md
index e7136db..e9d7360 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,3 @@
Managing Chef boxes with gossip.
-More description soon. Testing.
\ No newline at end of file
+More description soon.
\ No newline at end of file
それがこのコミットです: https://github.com/radekg/rgossip_app/commit/176e7cf764ff9ea0299ef75a21bb79a5bea11406
実行後、次のgit reset --hard
ようになります。
root@ip-10-222-29-69:/opt/rgossip# git reset --hard
HEAD is now at 176e7cf Testing with commits seems stupid.