Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- asp.net
- 배열
- jsp
- Spring_오류정리
- 이클립스
- java
- github
- SQL_용어정리
- DML
- MySQL
- workbench
- 인덱스
- Git_정리
- SQL
- 다이어그램
- 아파치톰캣
- 자바스크립트
- HTML
- Git_명령어정리
- Linux
- JavaScript
- Spring_에러정리
- CSS
- 인스턴스
- 자바
- spring
- Linux_명령어정리
- git
- json
- vb.net
Archives
- Today
- Total
데브마우스
[Git:명령어 정리] diff 명령어 정리 본문
git diff 명령을 사용하면 스테이지의 파일과 저장소에 있는 최신 커밋을 비교할 수 있습니다.
git diff 형식은 다음과 같습니다.
git diff [<options>] [<commit>] [--] [<path>…]
git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>…]
git diff [<options>] [--merge-base] <commit> [<commit>…] <commit> [--] [<path>…]
git diff [<options>] <commit>…<commit> [--] [<path>…]
git diff [<options>] <blob> <blob>
git diff [<options>] --no-index [--] <path> <path>
최신 커밋 기준 test.txt에 test만 작성되어 있었습니다.
text.txt에 2를 다음 줄에 추가하여 작성하였습니다.
git diff
diff --git a/test.txt b/test.txt
index 30d74d2..02acdd2 100644
--- a/test.txt
+++ b/test.txt
@@ -1 +1,2 @@
-test
\ No newline at end of file
+test
+2
\ No newline at end of file
'Git > Git: 명령어 정리' 카테고리의 다른 글
[Git:명령어 정리] 작업 되돌리는 명령어 정리: restore, reset, revert (0) | 2024.01.10 |
---|---|
[Git:명령어 정리] commit 명령어 정리 (0) | 2024.01.09 |
[Git:명령어 정리] log 명령어 정리 (0) | 2024.01.09 |
[Git:명령어 정리] add 명령어 정리 (0) | 2024.01.09 |
[Git:명령어 정리] init 명령어 정리 (0) | 2024.01.09 |