7

私はgitでかなり心配な問題を抱えています。

数日前、サーバー git がブルースクリーンになっているときに、いくつかの変更をコミットしていました。(実際には git が原因だったと考えられます。)

それ以来、私はリポジトリに変更をコミットできませんでしたが、他の人はできます。サーバーがクラッシュしたときにコミットしていたファイルへの変更をコミットできなくなりましたが、他のファイルへの変更はコミットできます。

新しいディレクトリを作成して、それにクローンを作成しようとしました。だけでgit stashなくgit pull --rebase、、、git stash apply

何があっても、サーバーがブルースクリーンになったときにコミットしていたファイルをコミットしようとすると、サーバーはエラーを返します。

$ git push -v
Pushing to http://bjury1@server:7990/scm/project.get
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 745 bytes | 0 bytes/s, done.
Total 7 (delta 6), reused 0 (delta 0)
POST git-receive-pack (881 bytes)
To http://bjury1@server:7990/scm/project.get
 ! [remote rejected] master -> master (missing necessary objects)
error: failed to push some refs to 'http://bjury1@server:7990/scm/project.get'

ファイルの追加や削除などのテスト変更をコミットできます。

git がここにどのようにインストールされているかはよくわかりませんが、(非常に古いバージョンの) StashJiraがあり、何らかの形でそれらに組み込まれていることは知っています。問題は、サーバーが故障している場合です。それを修正する方法さえわかりません。

サーバー上の特定のファイルのステータスをリセットまたは照会する方法はありますか?

どんな提案もありがたく受け取った!

編集:

私は通常、GitHub for Windowsを使用して変更をコミットし、問題がある場合にのみシェルにドロップすることに言及する価値があります。偶然にも、サーバーのブルー スクリーンにこのアプリのアップグレードがありました。

編集2:

GitHub for Windows とは関係ないと思いますが、リポジトリを再作成し、git 'console' と GitHub アプリの両方からテスト変更 (ファイルの追加と削除) をコミットできました。

ただし、サーバーが爆発したときにコミットしていた2つのファイルに変更をコミットしようとすると、上記のエラーが発生します。したがって、問題はサーバー上のこれらの特定のファイルに関係しています。

4

1 に答える 1

3

So when I saw that the problematic files that I was having problems with were the ones I was committing when the machine crashed, we tried having someone else create a small change and commit those changes to the system.

This worked for them. I could then do a pull for their changes and then I could then commit my changes to the files, getting everything back to how it should be.

So the answer is a simple one, have someone else commit the files into the repository, and pull them back out.

Why this works is a bit of a mystery. Presumably there is something user specific somewhere which was left in a bad state after the crash, so pulling a newer version over resets this 'corruption'.

Anyway, it works now so happy days! I'll leave this up as there was scant results on Google for this problem and maybe someone else has a similar issue.

于 2014-04-11T10:54:54.080 に答える