سؤال

I am new in Git. Currently, I am experiencing this scenario:

Step 0. I am working on a sub-branch

Step 1. I have added & commited file1, file2, file3 on my sub-branch with commit message msg1, msg2, msg3 respectively.

Step 2. I checkout master to switch to master branch

Step 3. I pull origin master to update master branch with latest origin version code

Step 4. I merge sub-branch to merge my working code to the current master branch code

Then, I got conflict in file2,

Then, I manually resolved the conflicts. Now, file2 needs to be added because there is changes on this file.

Step 5. I add file2 in master branch, because I have resolved the conflicts on this file

Step 6. What commit message should I write now? the msg2 only? or msg1, msg2, msg3 all needs to be rewritten now? (I don't want to loose the commit messages msg1,msg2,msg3 for the files I worked)

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top