Questions tagged [git-merge-conflict]

Questions about resolving merge conflicts in Git.

See also

518 questions
0
votes
1 answer

How merge with master without conflict after rebase in feature branch?

I plan on creating a feature branch, and in addition to the new commits in the feature branch, I might also make file edits to an older commit in the feature branch through git rebase. Then I plan on merging the feature branch to the master…
Raj Narayanan
  • 2,443
  • 4
  • 24
  • 43
0
votes
2 answers

finish git rebase operation after conflict

For my job I need to do a git rebase of my feature branch onto the development branch. These are my commands thus far to prepare the rebase: git checkout feature-branch git rebase development # resolve conflicts in Visual Studio git rebase…
Pieterjan
  • 2,738
  • 4
  • 28
  • 55
0
votes
0 answers

How to resolve recurring conflicts

I have two branches: dev and feature. Branch feature was created from dev. After that, there were new commits in the dev branch. I was merged dev branch into my feature. I have resolved many conflicts. However, I noticed that they were merged…
testivanivan
  • 967
  • 13
  • 36
0
votes
1 answer

How to proceed with git push when getting "rejected" and ": needs merge"?

Within project, someone pushed new files, I didn't pull them, then I've added new files, commited and then tried to push it to main. git push -u origin main Returns ! [rejected] main -> main (non-fast-forward) Then git checkout main Gives…
feration48
  • 145
  • 7
0
votes
1 answer

How can I keep the latest commits to avoid merge conflicts?

I'm doing a rebase and I want to keep always the changes made in the latest commit to avoid having to resolve the conflicts manually.
user13411047
0
votes
0 answers

Git merge with renames on one and same changes (formatter) on both sides

I've got two long living branches develop and next, where every commit in develop has to be in next as well. The files in next have been moved to different folders. Now I want to apply a formatter on the code base. I thought: If I apply the…
chkpnt
  • 125
  • 10
0
votes
1 answer

How to fix merge conflict that involves commenting out one line, and un-commenting another?

I wanted to comment out and un-comment . Can someone explain why this is a merge conflict and how to resolve it? This is when I'm trying to do a PR on Bitbucket.
0
votes
1 answer

Detect same lines when git merge results in confict

I have a branch A and two child branches B1 and B2, that were created from it. If I add single text/code line to a file in branch B1 and commit that change, then add the same line to the same file in branch B2 and then merge B2 into B1, I get no…
0
votes
1 answer

how to show Can’t automatically merge in github

When I push my code in Github and want to merge code with the main branch but shows "Can’t automatically merge. Don’t worry, you can still create the pull request." I am tried many times in many ways but failed. Please give me any suggestions.
0
votes
0 answers

bash script fails even if added "|| true" after git merge command

I'm trying to automate the git merge process using shell script and gitlab ci yaml file. issue is, if the merge conflict occurs, git merge command fails and the entire scripts exits with non-zero exit status. what I need is , if the merge conflicts…
user2315104
  • 2,378
  • 7
  • 35
  • 54
0
votes
1 answer

Git pull creating duplicate files with (conflict_on_) in name

Occasionally when I run git pull, certain files appear with (conflict_on_) at the end of the file. I don't know what is causing this, and searching on both Google and Stack has offered no results. The files don't always have changes, and some…
Paul
  • 817
  • 1
  • 10
  • 25
0
votes
0 answers

Cannot resolve git conflicts

I'm trying to resolve git conflicts but without success. I get this: git checkout PRM-1549-backend-functionality. // this the feature branch git pull origin staging // this is target branch > % git pull origin staging From…
user1285928
  • 1,328
  • 29
  • 98
  • 147
0
votes
3 answers

How Git manages an automatic solved merge?

I studied what is the git merge operation and what it does when it discovers a conflict that is not able to solve automatically. If I can solve manually the conflicts I can choose what I want to save and what I want to change. On the other hand we…
Filippo
  • 126
  • 1
  • 12
0
votes
0 answers

Reg; conflicts found while merging request github

We have found below conflicts while merging from bitbucket master branch to github master branch in one of the repositories. we need to merge in master branch in github how to resolve these conflicts, before merging its showing we need to …
0
votes
0 answers

GIt Merge Issue : Changes of my one file is not visible in git merge on the UI

I have 3 branches (Feature branch (a), Feature branch(b) and develop branch) . Aim is to merge both feature branches with their latest changes in the develop branch . Sequence of events : Merged feature branch (a) into develop Merge feature branch…