2016-10-21 4 views
1

動作しない、BabunのgitのとWindowsのgitのは、私は自分のコンピュータにインストールされた2つのGITSを持って一緒に

  1. 一つは(基本的には素敵なアドオンの束とcygwinのされている)babunで使用され、gitがありますpact install
  2. コマンドプロンプトでは1つが使用されていますが、これはWindowsの公式なgitバイナリです。

興味深いのは、babunのgitで作成されたコミットがWindows用のgitに反映されていなかったことです。例えば、同じgitリポジトリの場合、これはbabunのgitの結果です。

git status                  ~/apps/med-prerate-general 
On branch dev 
Your branch is ahead of 'origin/dev' by 1 commit. 
    (use "git push" to publish your local commits) 
nothing to commit, working directory clean 

これは、これを引き起こす可能性がどのようなWindowsの

git status 
On branch dev 
Your branch is ahead of 'origin/dev' by 1 commit. 
    (use "git push" to publish your local commits) 

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: somefile.iml 

no changes added to commit (use "git add" and/or "git commit -a") 

のためのgitの結果は? intellijはネイティブgitでしか動かすことができないので、結果は一貫している必要があります。バブンのgitで行った変更を見ることができませんでした。

答えて

0

この原因は何ですか?

どちらの~/apps/med-prerate-generalは(つまり、あなたが同じリモートリポジトリのための2つの異なるパスを見ている)のIntelliJで使用される実際の同じWindowsパスではありません

それとも~/apps/med-prerate-general(探して別の場所に配置独自の.gitフォルダを使用GIT_DIR環境変数)。そして.gitレポでは、.imlは追跡されず、無視されます。 (git check-ignore -v -- somefile.imlで確認してください)

+0

私はそれが同じリポジトリだと思います。私は 'git rev-parse --show-toplevel'を使ってチェックし、返されたパスは同じディレクトリを指していましたが、同じではありませんでした(Windowsのバージョンは' C:/Users/username/.babun/cygwin/home/home/username/apps/med-prerate-general'です。これが原因ですか? – Searene

+0

@Searene '/ home'が' C 'の場合は、 :/ Users/username/.babun/cygwin/home/'の場合、実際には同じローカルリポジトリにする必要があります。 – VonC

1

問題は、babunが正しく行末を処理していないことです。次の行は私の問題を解決します。

git config --global core.autocrlf input 
関連する問題