💡 URECA/🗒️ 스터디 노트
[URECA] Day 23 | Git
코딩하세현
2025. 2. 26. 21:59
728x90
버전관리
내가 원하는 시점(버전)으로 이동할 수 있게 해주는 것
버전 관리 시스템
이를 도와주는 툴
Git
소스 코드 버전 관리 시스템
Github
Git 호스팅 사이트 중 하나
vim 메모장
i 입력하고 들어가기
입력 완료했으면 esc키
vim 메모장
i 입력하고 들어가기
입력 완료했으면 esc키
:wq 입력하면 원래 화면 이동
그러면 저장되고 나온다.
cat 파일명 입력하면
파일 내용 나온다.
git init을 입력하면 git 초기화 과정 완료
커밋을 해야 로컬 저장소에 저장된다.
$ git config --list | grep user
<- user 환경 세팅 보여준다.
README.md가 붉게 나오는건
커밋전 add를 하라는 말
빩간색 사라지고 녹색생김
전체 과정 한번 더 다시!
git log를 한줄로 표시
checkout 보단 switch 쓰라는 말..말..홀스
---
light@YSH MINGW64 ~/Documents/Git_Test/Test2
$ git init
Initialized empty Git repository in C:/Users/light/Documents/G/
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ vim c1.txt
Aborting commit due to empty commit message.
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git commit -m c1
[master (root-commit) 38b6b52] c1
1 file changed, 1 insertion(+)
create mode 100644 c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git log --oneline --branches --graph
* 38b6b52 (HEAD -> master) c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ vim c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git add .
warning: in the working copy of 'c2.txt', LF will be replaced ime Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git commit -m c2
[master ff8cd58] c2
1 file changed, 1 insertion(+)
create mode 100644 c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git log --oneline --branches --graph
* ff8cd58 (HEAD -> master) c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git branch
* master
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git branch a
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git branch
a
* master
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git checkout a
Switched to branch 'a'
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ vim a1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ ls
a1.txt c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git add .
warning: in the working copy of 'a1.txt', LF will be replaced ime Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git status
On branch a
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: a1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git commit -m a1
[a 9e290e9] a1
1 file changed, 1 insertion(+)
create mode 100644 a1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git log --oneline --branches --graph
* 9e290e9 (HEAD -> a) a1
* ff8cd58 (master) c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ vim a2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git status
On branch a
Untracked files:
(use "git add <file>..." to include in what will be committe
a2.txt
nothing added to commit but untracked files present (use "git
g
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git commit -m a2
On branch a
Untracked files:
(use "git add <file>..." to include in what will be committe
a2.txt
nothing added to commit but untracked files present (use "git
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git log --oneline --branches --graph
* 9e290e9 (HEAD -> a) a1
* ff8cd58 (master) c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git add .
warning: in the working copy of 'a2.txt', LF will be replaced ime Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git commit -m a2
[a 0cef557] a2
1 file changed, 1 insertion(+)
create mode 100644 a2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git log --oneline --branches --graph
* 0cef557 (HEAD -> a) a2
* 9e290e9 a1
* ff8cd58 (master) c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git checkout master
Switched to branch 'master'
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git branch b
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git branch
a
b
* master
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git checkout b
Switched to branch 'b'
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ vim b1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ ls
b1.txt c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git commit -m b1
On branch b
Untracked files:
(use "git add <file>..." to include in what will be committe
b1.txt
nothing added to commit but untracked files present (use "git
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git add .
warning: in the working copy of 'b1.txt', LF will be replaced ime Git touches it
gi c
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git commit -m b1
[b bba614c] b1
1 file changed, 1 insertion(+)
create mode 100644 b1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git log --oneline --branches --graph
* bba614c (HEAD -> b) b1
| * 0cef557 (a) a2
| * 9e290e9 a1
|/
* ff8cd58 (master) c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git checkout mster
error: pathspec 'mster' did not match any file(s) known to git
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git checkout master
Switched to branch 'master'
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ cat c1.txt
c1 master가 편집함
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working d
modified: c1.txt
no changes added to commit (use "git add" and/or "git commit -
gi
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working d
modified: c1.txt
no changes added to commit (use "git add" and/or "git commit -
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git add .
warning: in the working copy of 'c1.txt', LF will be replaced ime Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git commit -m c3
[master b1a7c70] c3
1 file changed, 1 insertion(+), 1 deletion(-)
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git log
commit b1a7c706eb60d33aa281d032b709394880d3fb30 (HEAD -> maste
Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:24:55 2025 +0900
c3
commit ff8cd583d765c8a471b14f79b649be12d5ef6bd0
Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:13:48 2025 +0900
c2
commit 38b6b5238adea658bada1573727ec3de51d6d15e
Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:12:06 2025 +0900
c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git log --oneline --branches --graph
* b1a7c70 (HEAD -> master) c3
| * bba614c (b) b1
|/
| * 0cef557 (a) a2
| * 9e290e9 a1
|/
* ff8cd58 c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git checkout a
Switched to branch 'a'
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ ls
a1.txt a2.txt c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ cat c1.txt
c1 a가 편집함
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git status
On branch a
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: c1.txt
no changes added to commit (use "git add" and/or "git commit -a")
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git add .
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git commit -m a3
[a 94fc344] a3
1 file changed, 1 insertion(+), 1 deletion(-)
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git log --oneline --branches --graph
* 94fc344 (HEAD -> a) a3
* 0cef557 a2
* 9e290e9 a1
| * b1a7c70 (master) c3
|/
| * bba614c (b) b1
|/
* ff8cd58 c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (a)
$ git checkout master
Switched to branch 'master'
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git merge a
Auto-merging c1.txt
CONFLICT (content): Merge conflict in c1.txt
Automatic merge failed; fix conflicts and then commit the result.
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ cat c1.txt
c1 master가 편집함a가 편집함
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ git add .
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ git status
On branch master
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
new file: a1.txt
new file: a2.txt
modified: c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ git commit -m c4
[master 149661a] c4
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git status
On branch master
nothing to commit, working tree clean
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git log --oneline --branches --graph
* 149661a (HEAD -> master) c4
|\
| * 94fc344 (a) a3
| * 0cef557 a2
| * 9e290e9 a1
* | b1a7c70 c3
|/
| * bba614c (b) b1
|/
* ff8cd58 c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ cat c1.txt
c1 master가 편집함a가 편집함
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git checkout b
Switched to branch 'b'
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ ls
b1.txt c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ vim c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git add .
warning: in the working copy of 'c1', LF will be replaced by CRLF the next time Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git status
On branch b
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: c1
modified: c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git commit -m b2
[b 46868bf] b2
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (b)
$ git checkout master
Switched to branch 'master'
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git log --oneline --branches --graph
* 46868bf (b) b2
* bba614c b1
| * 149661a (HEAD -> master) c4
| |\
| | * 94fc344 (a) a3
| | * 0cef557 a2
| | * 9e290e9 a1
| |/
|/|
| * b1a7c70 c3
|/
* ff8cd58 c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git merge b
Auto-merging c1.txt
CONFLICT (content): Merge conflict in c1.txt
Automatic merge failed; fix conflicts and then commit the result.
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ ls
a1.txt a2.txt b1.txt c1 c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ git status
On branch master
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Changes to be committed:
new file: b1.txt
new file: c1
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: c1.txt
g
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ git add .
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ git status
On branch master
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
new file: b1.txt
new file: c1
modified: c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master|MERGING)
$ git commit -m "c5 c4와 b2를 merge"
[master 644094b] c5 c4와 b2를 merge
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git log --oneline --braches --grpah
fatal: unrecognized argument: --braches
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$ git log --oneline --branches --graph
* 644094b (HEAD -> master) c5 c4와 b2를 merge
|\
| * 46868bf (b) b2
| * bba614c b1
* | 149661a c4
|\ \
| * | 94fc344 (a) a3
| * | 0cef557 a2
| * | 9e290e9 a1
| |/
* / b1a7c70 c3
|/
* ff8cd58 c2
* 38b6b52 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test2 (master)
$
g
light@YSH MINGW64 ~/Documents/Git_Test/Test3
$ git init
Initialized empty Git repository in C:/Users/light/Docum/
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git add .
warning: in the working copy of 'c1.txt', LF will be repime Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git commit c1
error: pathspec 'c1' did not match any file(s) known to
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git commit -m c1
[master (root-commit) 9cade08] c1
1 file changed, 1 insertion(+)
create mode 100644 c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git status
On branch master
nothing to commit, working tree clean
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ vim c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --oneline --branches --graph
* 9cade08 (HEAD -> master) c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ vim c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git add .
warning: in the working copy of 'c2.txt', LF will be repime Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git commit -m c2
[master 7c66fc9] c2
1 file changed, 1 insertion(+)
create mode 100644 c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --oneline --branches --graph
* 7c66fc9 (HEAD -> master) c2
* 9cade08 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git branch
* master
g
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git branch a
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git branch
a
* master
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git checkout a
Switched to branch 'a'
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git add .
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git commit message -m a1
error: pathspec 'message' did not match any file(s) known to git
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git commit -m a1
On branch a
nothing to commit, working tree clean
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git status
On branch a
nothing to commit, working tree clean
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ vim a1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git status
On branch a
Untracked files:
(use "git add <file>..." to include in what will be committed)
a1.txt
nothing added to commit but untracked files present (use "git add" to track)
gt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git commit -m a1
On branch a
Untracked files:
(use "git add <file>..." to include in what will be committed)
a1.txt
nothing added to commit but untracked files present (use "git add" to track)
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git add .
warning: in the working copy of 'a1.txt', LF will be replaced by CRLF the next time Git touches it
i
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ gti commit -m a1
bash: gti: command not found
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git commit -m a1
[a 6f62273] a1
1 file changed, 2 insertions(+)
create mode 100644 a1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git log --oneline --branches --graph
* 6f62273 (HEAD -> a) a1
* 7c66fc9 (master) c2
* 9cade08 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ vim a2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git status
On branch a
Untracked files:
(use "git add <file>..." to include in what will be committed)
a2.txt
nothing added to commit but untracked files present (use "git add" to track)
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git add .
warning: in the working copy of 'a2.txt', LF will be replaced by CRLF the next time Git touches it
gi
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git commit -m a2
[a 46c4021] a2
1 file changed, 1 insertion(+)
create mode 100644 a2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git status
On branch a
nothing to commit, working tree clean
gt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git log --oneline --branches --graph
* 46c4021 (HEAD -> a) a2
* 6f62273 a1
* 7c66fc9 (master) c2
* 9cade08 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git add .
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git commit -m a2
On branch a
nothing to commit, working tree clean
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git checkout master
Switched to branch 'master'
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git branch b
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git checkout b
Switched to branch 'b'
it
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ vim b1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ ls
b1.txt c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git commit -m b1
On branch b
Untracked files:
(use "git add <file>..." to include in what will be committed)
b1.txt
nothing added to commit but untracked files present (use "git add" to track)
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git add .
warning: in the working copy of 'b1.txt', LF will be replaced by CRLF the next time Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git commit -m b1
[b 1645328] b1
1 file changed, 1 insertion(+)
create mode 100644 b1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ ggit log --oneline --branches --graph
bash: ggit: command not found
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git log --oneline --bracnges --graph
fatal: unrecognized argument: --bracnges
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git log --oneline --branches --graph
* 1645328 (HEAD -> b) b1
| * 46c4021 (a) a2
| * 6f62273 a1
|/
* 7c66fc9 (master) c2
* 9cade08 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git checkout master
Switched to branch 'master'
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ cat c1.txt
c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ cat c1.txt
c1: master 왔다감
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: c1.txt
no changes added to commit (use "git add" and/or "git commit -a")
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git add .
warning: in the working copy of 'c1.txt', LF will be replaced by CRLF the next time Git touches it
g
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git commit -m c3
[master f92bc48] c3
1 file changed, 1 insertion(+), 1 deletion(-)
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log
commit f92bc482cae5444f1f24f9f9ac50edbb1d90aee8 (HEAD ->
master)
commit f92bc482cae5444f1f24f9f9ac50edbb1d90aee8 (HEAD ->Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:56:21 2025 +0900
c3
commit 7c66fc917dd60ffabee226d37f96ae04db295bf0
Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:49:34 2025 +0900
c2
commit 9cade0807fdd7462aff3b20dc3308f0f873968e8
Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:43:16 2025 +0900
c1
/usr/bin/bash: line 1: s: command not found
commit f92bc482cae5444f1f24f9f9ac50edbb1d90aee8 (HEAD -> master)
Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:56:21 2025 +0900
c3
commit 7c66fc917dd60ffabee226d37f96ae04db295bf0
Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:49:34 2025 +0900
c2
commit 9cade0807fdd7462aff3b20dc3308f0f873968e8
Author: yshls <shluxnsal01@gmail.com>
Date: Wed Feb 26 15:43:16 2025 +0900
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --oneline --branches --graph
* f92bc48 (HEAD -> master) c3
| * 1645328 (b) b1
|/
| * 46c4021 (a) a2
| * 6f62273 a1
|/
* 7c66fc9 c2
* 9cade08 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git checkout a
Switched to branch 'a'
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ ls
a1.txt a2.txt c1.txt c2.txt kl
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git status
On branch a
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: c1.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
kl
no changes added to commit (use "git add" and/or "git commit -a")
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git add .
warning: in the working copy of 'kl', LF will be replaced by CRLF the next time Git touches it
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git commit -m a3
[a 230ae3a] a3
2 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 kl
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git log --oneline --branches --graph
* 230ae3a (HEAD -> a) a3
* 46c4021 a2
* 6f62273 a1
| * f92bc48 (master) c3
|/
| * 1645328 (b) b1
|/
* 7c66fc9 c2
* 9cade08 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (a)
$ git checkout master
Switched to branch 'master'
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ ls
c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git merge a
Auto-merging c1.txt
CONFLICT (content): Merge conflict in c1.txt
Automatic merge failed; fix conflicts and then commit the result.
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master|MERGING)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master|MERGING)
$ git add .
i
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master|MERGING)
$ git commit -m c4
[master 1053e1c] c4
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git status
On branch master
nothing to commit, working tree clean
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --online --branches --grap
fatal: unrecognized argument: --online
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --oneline --branches --grap
fatal: unrecognized argument: --grap
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --oneline --branches --grap
fatal: unrecognized argument: --grap
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --oneline --branches --graph
* 1053e1c (HEAD -> master) c4
|\
| * 230ae3a (a) a3
| * 46c4021 a2
| * 6f62273 a1
* | f92bc48 c3
|/
| * 1645328 (b) b1
|/
* 7c66fc9 c2
* 9cade08 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ cat c1.txt
c1: master 왔다감c1: a가 왔다감
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git checkout b
Switched to branch 'b'
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ ls
b1.txt c1.txt c2.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git add .
i
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git commit -m b2
[b 18f9b52] b2
1 file changed, 1 insertion(+), 1 deletion(-)
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (b)
$ git checkout master
Switched to branch 'master'
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --oneline --branches --graph
* 18f9b52 (b) b2
* 1645328 b1
| * 1053e1c (HEAD -> master) c4
| |\
| | * 230ae3a (a) a3
| | * 46c4021 a2
| | * 6f62273 a1
| |/
|/|
| * f92bc48 c3
|/
* 7c66fc9 c2
* 9cade08 c1
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git merge b
Auto-merging c1.txt
CONFLICT (content): Merge conflict in c1.txt
Automatic merge failed; fix conflicts and then commit the result.
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master|MERGING)
$ ls
a1.txt a2.txt b1.txt c1.txt c2.txt kl
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master|MERGING)
$ vim c1.txt
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master|MERGING)
$ git add .
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master|MERGING)
$ git commit -m "c5: c4와 b2를 merge"
[master 3d0cb26] c5: c4와 b2를 merge
light@YSH MINGW64 ~/Documents/Git_Test/Test3 (master)
$ git log --oneline --branches --graph
* 3d0cb26 (HEAD -> master) c5: c4와 b2를 merge
|\
| * 18f9b52 (b) b2
| * 1645328 b1
* | 1053e1c c4
|\ \
| * | 230ae3a (a) a3
| * | 46c4021 a2
| * | 6f62273 a1
| |/
* / f92bc48 c3
|/
* 7c66fc9 c2
* 9cade08 c1
더보기
Retrospective
중간에 실습하다 소스트리 origin으로 push를 하는 과정에서 오류가났다..
무시한채 계속 했다.. 일단.. 근데 놓쳤다..
오류를 해결하다.. 실패했다.. gpt를 통해서 해결해보려고도 했지만 실패했다.. 왜지?
회고도 꾸준히 적을예정이다..
728x90