0

この Git リポジトリには奇妙な問題があり、github とのやり取りの後に作業ディレクトリがランダムにダーティになります。

通常、変更を確認します。

root@debian:/var/www/MyDir# git status
    # On branch development
    # Changed but not updated:
    #   (use "git add <file>..." to update what will be committed)
    #   (use "git checkout -- <file>..." to discard changes in working directory)
    #
    #   modified:   path-to-some-file1.css
    #   modified:   path-to-some-file2.js
    #   modified:   path-to-some-file3.html
    #
    no changes added to commit (use "git add" and/or "git commit -a")

それらをコミットします。

root@debian:/var/www/MyDir# git commit -am "my custom"
    [development e9e4235] my custom
     3 files changed, 21 insertions(+), 48 deletions(-)

プルとリベースにより、私の変更はマイナーであり、追加の「マージ」コミットは必要ありません。

root@debian:/var/www/MyDir# git pull --rebase
    Enter passphrase for key '/root/.ssh/id_rsa': 
    Current branch development is up to date.

押す:

root@debian:/var/www/MyDir# git push
    Enter passphrase for key '/root/.ssh/id_rsa': 
    Counting objects: 21, done.
    Compressing objects: 100% (10/10), done.
    Writing objects: 100% (11/11), 1013 bytes, done.
    Total 11 (delta 9), reused 0 (delta 0)
    To git@github.com:User/MyRepo.git
       72612a8..e9e4235  HEAD -> development

私のステータスをチェックしてください、すべての変更ファイル!! 「それは変だ、私はそれらを編集していない...」

root@debian:/var/www/MyDir# git status
    # On branch development
    # Changes to be committed:
    #   (use "git reset HEAD <file>..." to unstage)
    #
    #   modified:   path-to-some-file-a-coworker-edited-in-a-previous-commit-4.css
    #   modified:   path-to-some-file-a-coworker-edited-in-a-previous-commit-5.css
    #   modified:   path-to-some-file-a-coworker-edited-in-a-previous-commit-6.css
    #   modified:   path-to-some-file-a-coworker-edited-in-a-previous-commit-7.css
    #
    # Changed but not updated:
    #   (use "git add <file>..." to update what will be committed)
    #   (use "git checkout -- <file>..." to discard changes in working directory)
    #
    #   modified:   path-to-some-file-a-coworker-edited-in-a-previous-commit-4.css
    #   modified:   path-to-some-file-a-coworker-edited-in-a-previous-commit-5.css
    #   modified:   path-to-some-file-a-coworker-edited-in-a-previous-commit-6.css
    #   modified:   path-to-some-file-a-coworker-edited-in-a-previous-commit-7.css
    #

リセットすると修正されます:

root@debian:/var/www/MyDir# git reset

root@debian:/var/www/MyDir# git status
    # On branch development
    nothing to commit (working directory clean)

この奇妙な動作に詳しい人はいますか?

これは正常ですか、私は何か完全に間違っているのでしょうか、それとも git のバグでしょうか?

4

0 に答える 0