Recent Posts
Recent Comments
변군이글루
[GIT] 깃 브랜치(git branch) 생성, 삭제 본문
git branch 생성, 삭제
로컬 branch 생성(Deployment environment)
git branch [<options>] (-c | -C) [<old-branch>] <new-branch>
git checkout -b "testing"
$ git checkout -b "testing"
Switched to a new branch 'testing'
$ git checkout -b "staging"
Switched to a new branch 'staging'
branch 확인(현재 branch)
git branch --list
git branch
$ git branch
--
dev
master
testing
* staging
---
로컬 branch 이름 변경(dev -> development)
git branch [<options>] (-m | -M) [<old-branch>] <new-branch>
git branch -m dev development
로컬 branch 삭제
git branch [<options>] [-r] (-d | -D) <branch-name>
git branch -D dev
$ git branch -d dev
Deleted branch dev (was e178f0c).
$ git branch -D ggg
Deleted branch ggg (was f2b8f21).
branch 확인(현재 branch)
git branch
$ git branch
---
development
master
production
* staging
testing
(END)
---
원격 저장소에 branch 생성
git push origin staging
$ git push origin staging
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: To create a merge request for staging, visit:
remote: http://gitlab.sangchul.kr/playground/merge_requests/new?merge_request%5Bsource_branch%5D=staging
remote:
To http://gitlab.sangchul.kr/playground.git
* [new branch] staging -> staging
원격 저장소에 branch 삭제
git push origin :dev
$ git push origin :dev
To http://gitlab.sangchul.kr/playground.git
- [deleted] dev
'* 리눅스' 카테고리의 다른 글
[명령어] history 명령어 (1) | 2021.01.28 |
---|---|
[GIT] 깃 태그(git tag) 생성, 삭제 (0) | 2021.01.27 |
[GIT] 깃 브랜치(git branch) 생성, 삭제 (0) | 2021.01.27 |
[리눅스] CentOS 8에서 CentOS Stream으로 마이그레이션 (1) | 2021.01.26 |
[리눅스] CentOS Stream 설치(Centos 8 스트림 설치) (0) | 2021.01.26 |
[명령어] tput 명령어 (0) | 2021.01.25 |
- Tag
- branch, Git, git branch, git command, git_branch, git_command, git_명령어, git명령어, 깃 브랜치, 브랜치
0 Comments