[Git] Terminal 브랜치 생성 및 원격 브랜치 체크아웃하기
- 기타 / 형상관리
- 2023. 4. 7.
▼ 다음은 간단한 브랜치 생성입니다. 처음 앱을 생성하면 main 브랜치 밖에 없는데 새로운 개발 브랜치를 만들려면 다음과 같이 명령어를 입력합니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a new branch | |
git branch develop |
▼ 만약 새로 만든 브랜치로 체크아웃하려면 다음과 같이 명령어를 입력합니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change environment to the new branch | |
git checkout develop |
▼ 또한 브랜치의 리스트를 보려면 다음과 같이 입력합니다. 원격에 있는 브랜치 리스트들을 보려면 -r 옵션을 추가해줍니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show all branches | |
git branch | |
# show all remote branches | |
git branch -r |
▼ 마찬가지로 원격 브랜치를 체크아웃 하려면 checkout 명령어를 사용해서 원격 브랜치 명을 입력하면 됩니다.

'기타 > 형상관리' 카테고리의 다른 글
[Git] 빈 커밋 만들기 (0) | 2024.08.22 |
---|---|
[Git] .gitignore 설정 정리 (0) | 2024.03.06 |
[Git] 소프트웨어 버전 표기법 (0) | 2023.06.16 |
[Git] vim을 기본 에디터로 변경하기 (0) | 2023.04.08 |
[Git] 깃 커밋(Commit), 추가(Add) 상태 취소 명령 (0) | 2021.06.02 |