'Git merge is automatically accepting incoming changes even though there is a conflict
I am new to git and recently I have encountered a problem that is
once I merge my feature_branch with main and continue to work on the feature_branch and merge it again with main...The main automatically accepts the incoming changes. Whereas during the first merge...I got an option to either accept the incoming change or not.
this is how I did the process in VS code terminal
git clone "..."
create a file
written some code and committed it in main
git branch feature_branch
git checkout feature_branch
modified the same code so as to get a conflict
git commit -am "..."
git checkout main
git merge feature_branch
as this is the first merge...I got an option in VS code to either keep the current changes or accept the incoming changes or compare them. later I added some code into main as well as feature_branch...to bring the conflict again but this time when I merge into main..even though there is a conflict, somehow it is automatically accepting incoming changes.
this is how I get a message after I type git merge feature_branch for the second time.
Fast-forward
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
My intention is to get the conflict resolution options every time I do git merge...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
