"Git checkout"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(다른 사용자 한 명의 중간 판 2개는 보이지 않습니다)
7번째 줄: 7번째 줄:
==실습 1==
==실습 1==
{{참고|Git 브랜치 전환}}
{{참고|Git 브랜치 전환}}
<source lang='bash'>
<syntaxhighlight lang='bash'>
git checkout 브랜치명
git checkout 기존브랜치명
</source>
</syntaxhighlight>


==실습 2==
==실습 2==
{{참고|Git 파일 원복}}
{{참고|Git 파일 원복}}
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~/workspace/hello# cat greet.txt
root@zetawiki:~/workspace/hello# cat greet.txt
hello world
hello world
good morning
good morning
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~/workspace/hello# git checkout HEAD greet.txt
root@zetawiki:~/workspace/hello# git checkout HEAD greet.txt
root@zetawiki:~/workspace/hello# cat greet.txt
root@zetawiki:~/workspace/hello# cat greet.txt
hello world
hello world
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
30번째 줄: 30번째 줄:
* [[git 명령어]]
* [[git 명령어]]
* [[git 브랜치 전환]]
* [[git 브랜치 전환]]
* [[git add 취소하기]]
* [[git clone 특정 릴리즈 가져오기]]
* [[git clone 특정 릴리즈 가져오기]]
* [[체크아웃]]
* [[체크아웃]]


[[분류: git]]
[[분류: git]]

2021년 9월 24일 (금) 23:29 기준 최신판

1 개요[ | ]

git checkout
깃 체크아웃
  • 브랜치를 전환하거나, 작업트리파일을 원복하는 git 명령어

2 실습 1[ | ]

git checkout 기존브랜치명

3 실습 2[ | ]

root@zetawiki:~/workspace/hello# cat greet.txt
hello world
good morning
root@zetawiki:~/workspace/hello# git checkout HEAD greet.txt
root@zetawiki:~/workspace/hello# cat greet.txt
hello world

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}