본문 바로가기

Git & GitHub

Git Branch

1.  branch 추가

git branch 20200722

2. branch 확인

$ git branch
  20200722
* master

3. branch 변경

$ git checkout 20200722
Switched to branch '20200722'

4. branch 변경 확인

$ git branch
* 20200722
  master

5. 추가

$ git add .

6. Commit

$ git commit -m "20200722 Kotlin"
[20200722 7836f78] 20200722 Kotlin
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 README

7. 새로 생성한 branch에 push

$ git push origin 20200722
Enumerating objects: 27, done.
Counting objects: 100% (27/27), done.
Delta compression using up to 8 threads
Compressing objects: 100% (12/12), done.
Writing objects: 100% (16/16), 1.99 KiB | 508.00 KiB/s, done.
Total 16 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5), completed with 4 local objects.
remote:
remote: Create a pull request for '20200722' on GitHub by visiting:
remote:      https://github.com/xxxxxx/xxxxxxxxxxxx
remote:
To https://github.com/psjw/Kotlin.git
 * [new branch]      20200722 -> 20200722

'Git & GitHub' 카테고리의 다른 글

Github 추가  (0) 2020.07.20