
merge 하고자 하는 branch에서 Pull request를 누른다.

master 에서 "추가"된 것이 아니라, "변경"된 사항이 있다면 "Can't automaticallhy merge" 라는 말과 함께 merge가 진행되지 않는다. 왼쪽 하단의 Create pull request를 눌러서 직접 겹치는 부분을 수정해주어야 한다.

Create pull request를 누르면, 어떤 파일이 master와 다른지 나온다. "Resolve conflicts" 버튼을 눌러서 상세 코드를 볼 수 있다.
<<<<<<< khs // branch 이름이다. 여기서 부터
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kr.butterknife.talenthouse">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.TalentHouse">
<activity android:name=".SignUpActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity" >
</activity>
</application>
======= // khs branch 코드 끝, 밑으로는 master 코드
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kr.butterknife.talenthouse">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.TalentHouse">
<activity android:name=".SignUpActivity"></activity>
<activity android:name=".LoginActivity" />
<activity android:name=".SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity" />
</application>
>>>>>>> master // master 코드 끝
</manifest>
달라진 부분을 수정 한 후에, 합친 코드만을 남기고 나머지는 전부 지워준 후에 merge를 완료한다.
'Git 끄적 끄적' 카테고리의 다른 글
팀 프로젝트를 위한 github organization 설정 (0) | 2021.04.29 |
---|---|
매번 까먹어서 쓰는 gitignore 작성법 (0) | 2021.04.12 |
매번 까먹어서 작성하는 git push 취소 방법 (0) | 2021.04.08 |
맨날 까먹어서 쓰는 Git branch 생성 (0) | 2021.03.28 |