My merge forward pull request having merge conflict has not only merged forward after resolving the conflict but also merged the code backwards

I am facing a problem while merging forward my code.

Let say there are 2 branches names Jan2024 & Feb2024.
The Feb2024 branch was created from the Jan2024 branch as base branch. During the time when the Feb2024 branch was created, the Jan2024 branch had only 3 files: A.txt, B.txt and C.txt. But later both the branches had changes made where some files were added/modified.

The Jan2024 branch has the below files after changes were made:
A.txt   #Existing file
B.txt   #Exisitng file
C.txt   #Existing file but updated to show the text -> "January code changes"
D.txt   #Newely added file
E.txt   #Newely added file

The Feb2024 branch has the files:
A.txt   #Existing file
B.txt   #Existing file
C.txt   #Existing file but updated to show the text -> "February code changes"
F.txt   #Newely added file
G.txt   #Newely added file

When trying to merge forward from Jan2024 to Feb2024 there was a conflict occurred in file C.txt because it was modified in both the branches. I had resolved the conflict by updating the file in the web editor to show the text “January code changes” in both the branches.

After clicking on merge commit and Merging the branches I was shocked to see what had happened. Not only were the added/modified files from Jan2024 were merged to the Feb2024 branch but also the files added/modified in Feb2024 were merged to the Jan2024 branch. All this happened within one pull request which clearly says we are trying to merger Fan2024 to Feb2024. But I don’t know how the Feb2024 was merged back into the Jan2024.

This is how the below branches looked after the merge forward which is not what I expected.

Jan2024 branch:
===============
A.txt   #Existing file
B.txt   #Exisitng file
C.txt   #Existing file which shows the text -> "January code changes"
D.txt   #Newely added file
E.txt   #Newely added file
F.txt   #Newely added file from Feb2024 branch
G.txt   #Newely added file from Feb2024 branch

Feb2024 branch:
===============
A.txt   #Existing file
B.txt   #Existing file
C.txt   #Existing file which shows the text -> "January code changes"
D.txt   #Newely added file from Jan2024 branch
E.txt   #Newely added file from Jan2024 branch
F.txt   #Newely added file
G.txt   #Newely added file

But this is how I expected the below branches to look after the merge forward. But unfortunately it didnt.

Jan2024 branch:
===============
A.txt   #Existing file
B.txt   #Exisitng file
C.txt   #Existing file which shows the text -> "January code changes"
D.txt   #Newely added file
E.txt   #Newely added file

Feb2024 branch:
===============
A.txt   #Existing file
B.txt   #Existing file
C.txt   #Existing file which shows the text -> "January code changes"
D.txt   #Newely added file from Jan2024 branch
E.txt   #Newely added file from Jan2024 branch
F.txt   #Newely added file
G.txt   #Newely added file

When I tried Reverting the pull request I can see that the D.txt and E.txt were removed from the Feb2024 branch but F.txt and G.txt were not removed from the Jan2024 branch.

Also I tried removing the files F.txt and G.txt from the Jan2024 branch but after removing when I compared Jan2024 and Feb2024 branches its not identifying the files D.txt and E.txt which need to be pushed to the Feb2024 branch. Instead its identifying the files F.txt and G.txt as files which need to be removed from the Feb2024 branch when trying to merge Jan2024 to Feb2024.

Whatever I tried seems to be worsening the existing problem. Kindly suggest a way to remove the F.txt and G.txt from the Jan2024 branch and at the same time merge Jan2024 to Feb2024 so that the Feb2024 branch looks like what I expect above.

New contributor

mohammed adnan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật