Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

항해 플러스 Git 사전 강의 Rebase Conflict 해결 과정 #2

Open
nmin11 opened this issue Mar 12, 2025 · 0 comments
Open

항해 플러스 Git 사전 강의 Rebase Conflict 해결 과정 #2

nmin11 opened this issue Mar 12, 2025 · 0 comments

Comments

@nmin11
Copy link
Owner

nmin11 commented Mar 12, 2025

명령어 사용 이력

9463  mkdir tmp && cd tmp
9464  touch conflict_test.txt
9465  git add conflict_test.txt
9466  git commit -m "chore: make test file for conflict resolve"
9467  git checkout -b feature
9468  echo "안녕하세요, 여기는 feature 브랜치입니다." > conflict_test.txt
9469  git add conflict_test.txt
9470  git commit -m "chore: feature branch commit test"
9471  git checkout main
9472  echo "안녕하세요, 여기는 main 브랜치입니다." > conflict_test.txt
9473  git add conflict_test.txt
9474  git commit -m "chore: main branch commit test"
9475  git checkout feature
9476  git rebase main
9477  git add conflict_test.txt
9478  git rebase --continue
9479  git log --oneline
9480  cat conflict_test.txt
9481  vim conflict_test.txt
9482  git add conflict_test.txt
9483  git commit -m "chore: feature branch commit test"

과정 요약

  1. 실습을 진행할 tmp 디렉토리 생성 후 이동
  2. tmp 디렉토리 안에 실습을 진행할 conflict_test.txt 파일 생성
  3. 파일 생성 이력만 main 브랜치에 우선적으로 커밋
  4. feature 브랜치 이동 후 conflict_test.txt 파일에 feature 브랜치만의 메시지 작성 후 커밋
  5. main 브랜치 이동 후 conflict_test.txt 파일에 main 브랜치만의 메시지 작성 후 커밋
  6. feature 브랜치 이동 후 main 으로 rebase 시도
  7. conflict 발생 메시지 확인 후 파일을 수정하여 충돌 해결
  8. 해결한 내역 commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant