Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在の作業ディレクトリに という変更されたファイルがありますfile.txt。デバッグブランチのバージョンと比較したい。次のコマンドは機能しません。
file.txt
git diff file.txt debug:file.txt
致命的: パス 'file.txt' はディスク上に存在しますが、'debug' には存在しません
どうすればそれらを比較できますか? 最初にコミットする必要がありますか?
file.txt次のコマンドを使用して、現在のブランチからdebugブランチを比較します。
debug
git diff debug file.txt