Skip to main content
  1. Learn center
  2. Software Development
  3. Guides
  4. Git tutorial
  5. Git 사용 방법
  6. Git에서 브랜치를 사용하는 방법
  7. 병렬 작업
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

병렬 작업

브랜치를 통해 여러 병렬 작업 공간에서 작업할 수 있습니다.

이를 시연하기 위해 issue2라는 이름과 issue3이라는 이름을 가진 두 개의 브랜치를 만든 다음 issue2로 전환합니다.

$ git branch issue2
$ git branch issue3
$ git checkout issue2
Switched to branch 'issue2'
$ git branch
* issue2
  issue3
  main

이 시점에서 이것이 우리의 기록입니다.

Current history

다음으로, 아래의 굵은 텍스트를 myfile.txt 파일에 추가합니다.

Anyone can learn Git with this tutorial and Backlog add: Register a change in an index commit: Save the status of an index

그런 다음 변경 사항을 커밋합니다.

$ git add myfile.txt
$ git commit -m "append description of the commit command"
[issue2 8f7aa27] append description of the commit command
  1 files changed, 2 insertions(+), 0 deletions(-)

이것이 이제 우리의 기록입니다.

Current history

다음으로 issue3 브랜치로 전환합니다.

$ git checkout issue3
Switched to branch 'issue3'

issue3 브랜치는 현재 메인 브랜치와 동일한 역사와 기록을 가지고 있습니다. issue2 브랜치에 커밋되었기 때문에 방금 만든 변경 사항은 포함되지 않습니다.

아래의 굵은 텍스트를 myfile.txt 파일에 추가합니다.

Anyone can learn Git with this tutorial and Backlog add: Register a change in an index pull: Obtain the content of the remote repository

그리고 add 명령으로 변경 사항을 커밋합니다.

$ git add myfile.txt
$ git commit -m "append description of the pull command"
  [issue3 e5f91ac] append description of the pull command
    1 files changed, 2 insertions(+), 0 deletions(-)

이것이 이제 우리의 기록입니다.

Current history

두 개의 서로 다른 브랜치에 두 개의 서로 다른 텍스트 줄을 병렬로 추가했습니다

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life