rcity

rcity17 Write-Up

jeff_kim 2024. 4. 2. 18:05

 

풀이

rcity17@9947d876f6e5:~$ ls
rcity18
rcity17@9947d876f6e5:~$ cat rcity18 
Initial commit
Add feature A
Add feature B

 

별 다른 내용 없다

 

rcity17@9947d876f6e5:~$ git log
commit ace1b3e50dc2d3e51d56174ae9df97751b28317a (HEAD -> master)
Author: rcity17 <rcity17@saveme.com>
Date:   Wed Mar 6 08:04:14 2024 +0000

    Add feature B by Alice

commit 6c18974e94e36f197b21d1229eaab6c6da6b6d42
Author: rcity17 <rcity17@saveme.com>
Date:   Wed Mar 6 08:04:14 2024 +0000

    Remove the rcity18 flag by Bob

commit 2ad972449af03e66774b60cdfd3c5fbcc87b3c84
Author: rcity17 <rcity17@saveme.com>
Date:   Wed Mar 6 08:04:14 2024 +0000

    Add and then remove the rcity18 flag

commit 69f15b08cc536a5d66127eb87432e2d79be1c23e
Author: rcity17 <rcity17@saveme.com>
Date:   Wed Mar 6 08:04:14 2024 +0000

    Add feature A by Alice

commit 6b5375844fcc5f2eb005007f942c92f25194ce28
Author: rcity17 <rcity17@saveme.com>
Date:   Wed Mar 6 08:04:14 2024 +0000

    Initial commit by Alice
rcity17@9947d876f6e5:~$

 

rcity18 flag가 추가되고 삭제되었다는 commit hash log가 남아있다

 

rcity17@9947d876f6e5:~$ git checkout 2ad972449af03e66774b60cdfd3c5fbcc87b3c84
fatal: Unable to create '/home/rcity17/.git/index.lock': Permission denied

 

하지만 커밋된 hash 값을 넣어 checkout 하려고했지만 Permission denied가 떳다 하지만 다른 한가지 확인 할 수 있는 방법이 있다

 

 

바로 git show 를 이용하는 것이다

rcity17@9947d876f6e5:~$ git show 2ad972449af03e66774b60cdfd3c5fbcc87b3c84
commit 2ad972449af03e66774b60cdfd3c5fbcc87b3c84
Author: rcity17 <rcity17@saveme.com>
Date:   Wed Mar 6 08:04:14 2024 +0000

    Add and then remove the rcity18 flag

diff --git a/rcity18 b/rcity18
index 2272f81..1ac9022 100644
--- a/rcity18
+++ b/rcity18
@@ -1,2 +1,3 @@
 Initial commit
 Add feature A
+rcity18 flag p2q7d3i2mS6w5c0r6G1

 

flag 값 획득!!

'rcity' 카테고리의 다른 글

rcity18 Write-Up  (0) 2024.04.02
rcity16 Write-Up  (0) 2024.04.02
rcity15 Write-Up  (0) 2024.04.02
rcity14 Write-Up  (0) 2024.04.01
rcity13 Write-Up  (0) 2024.04.01