Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Flutter
- textview
- CustomScrollView
- android
- 안드로이드
- textfield
- viewmodel
- DART
- binding
- TEST
- drift
- LifeCycle
- appbar
- 테스트
- Kotlin
- Coroutines
- livedata
- activity
- scroll
- 앱
- Dialog
- Button
- tabbar
- 계측
- 앱바
- Compose
- data
- Navigation
- intent
- ScrollView
Archives
- Today
- Total
Study Record
[Git] 충돌 해결하기 본문
728x90
merge시 충돌 상황 해결하기!
merge 했을 때, 충돌이 발생하면 다음과 같은 현상이 발생한다!
# 형식 : git merge "브랜치명"
git merge conflict-1
충돌이 발생한 부분을 수정하고 다시 add와 commit을 해준다.
git add .
# commit 메시지를 주지 않으면 자동으로 부여해준다. (필요시 :wq! 입력)
git commit
merge 중단하기
git merge --abort
rebase시 충돌 상황 해결하기!
main 브랜치를 한줄로 conflict-2 브랜치를 rebase 하려는 상황에서 충돌이 발생했을 경우
> git switch conflict-2
> git rebase main
충돌 부분을 수정하여 해결한 뒤 add와 rebase --continue를 실행하여 rebase를 계속한다.
git add .
git rebase --continue
rebase를 하다가 또 충돌이 날수도 있다!! 그럴 땐 당황하지 말고 앞의 과정을 한번 더 반복한다.
rebase에 성공하면 main으로 switch하여 conflict-2 와 merge까지 하면 완성이다!
rebase 중단하기
git rebase --abort
728x90
'Git' 카테고리의 다른 글
[GitHub] 원격 저장소 만들기 & 다운받기(clone) (0) | 2022.02.22 |
---|---|
[GitHub] GitHub는 왜 쓰는 걸까? (0) | 2022.02.22 |
[Git] branch 합치기(merge / rebase) (0) | 2022.02.18 |
[Git] branch & switch (0) | 2022.02.16 |
[Git] 과거로 돌아가는 방법(Reset vs Revert) (0) | 2022.02.16 |