diff --git a/README.md b/README.md index b42c461..ac68294 100644 --- a/README.md +++ b/README.md @@ -1829,12 +1829,16 @@ Assuming you want to compare last commit with file from commit c5f567: ```sh $ git diff HEAD:path_to_file/file c5f567:path_to_file/file +# or +$ git diff HEAD c5f567 -- path_to_file/file ``` -Same goes for branches: +If you are going to compare changes between the tips of the `main` and the `staging` branches: ```sh $ git diff main:path_to_file/file staging:path_to_file/file +# or +$ git diff main staging -- path_to_file/file ``` ### I want Git to ignore changes to a specific file diff --git a/README_fr.md b/README_fr.md index 3afc804..67d6849 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1450,12 +1450,16 @@ Supposons que vous voulez comparer le dernier commit avec le fichier du commit ` ```sh $ git diff HEAD:path_to_file/file c5f567:path_to_file/file +# ou +$ git diff HEAD c5f567 -- path_to_file/file ``` Il en est de même pour les branches : ```sh $ git diff main:path_to_file/file staging:path_to_file/file +# ou +$ git diff main staging -- path_to_file/file ``` ### Je veux que Git ignore les changements d'un fichier spécifique diff --git a/README_ja.md b/README_ja.md index 0ad1940..5d5f016 100644 --- a/README_ja.md +++ b/README_ja.md @@ -1873,12 +1873,16 @@ $ git push origin refs/tags/ ```sh $ git diff HEAD:path_to_file/file c5f567:path_to_file/file +# または +$ git diff HEAD c5f567 -- path_to_file/file ``` ブランチでも同様です。 ```sh $ git diff main:path_to_file/file staging:path_to_file/file +# または +$ git diff main staging -- path_to_file/file ``` ### 特定のファイルの変更を無視したい diff --git a/README_kr.md b/README_kr.md index 14bd841..9fca209 100644 --- a/README_kr.md +++ b/README_kr.md @@ -1409,12 +1409,16 @@ c5f567 한 단계전으로 복구하고 싶다면, c5f567~1로 적어줘요: ```sh $ git diff HEAD:path_to_file/file c5f567:path_to_file/file +# 아니면 짧게: +$ git diff HEAD c5f567 -- path_to_file/file ``` 브랜치도 같은 방법으로: ```sh $ git diff main:path_to_file/file staging:path_to_file/file +# 아니면 짧게: +$ git diff main staging -- path_to_file/file ``` ## 설정 diff --git a/README_ru.md b/README_ru.md index 48376ee..5378865 100644 --- a/README_ru.md +++ b/README_ru.md @@ -1681,12 +1681,16 @@ $ git push origin refs/tags/ ```sh $ git diff HEAD:path_to_file/file c5f567:path_to_file/file +# или +$ git diff HEAD c5f567 -- path_to_file/file ``` Аналогично для веток: ```sh $ git diff main:path_to_file/file staging:path_to_file/file +# или +$ git diff main staging -- path_to_file/file ``` ### Я хочу, чтобы Git игнорировал изменения в определенном файле diff --git a/README_vi.md b/README_vi.md index f08e73c..bb74bb8 100644 --- a/README_vi.md +++ b/README_vi.md @@ -1776,12 +1776,16 @@ Giả sử bạn muốn so sánh commit cuối cùng với tệp từ commit c5f ```sh $ git diff HEAD:path_to_file/file c5f567:path_to_file/file +# hoặc +$ git diff HEAD c5f567 -- path_to_file/file ``` Cũng giống khi so sánh nhánh nhánh: ```sh $ git diff main:path_to_file/file staging:path_to_file/file +# hoặc +$ git diff main staging -- path_to_file/file ``` ### Tôi muốn Git bỏ qua những thay đổi đối với một tệp cụ thể