Questions tagged [git-merge]

git-merge is a git command which integrates changes from another branch by incorporating commits into the currently checked-out branch.

A merge in version control is an operation where two sets of changes are combined to have both features available.

Git provides sophisticated merge support by automatically detecting simple merges (i.e. if only changes on one branch happened, also called fast-forward) and allowing plugable merge-strategies for more advanced use-cases.

3320 questions
1
vote
2 answers

How to skip some file during merge request on gitlab

I am having two branches on GitLab(1.Staging & 2.Production). In my Angular and NodeJS application there is one part(e.g. Contact us ), which I don't want to deploy on production. I want it in staging branch but not in production branch. So my…
Aary
  • 67
  • 1
  • 5
1
vote
1 answer

Not able to resolve conflict in Azure DevOps

Unable to merge the conflict in Azure Devops I have created the Pull Request from api_integration branch to development branch. But there are some conflicts I can see but as my Complete button is disabled, not sure how to deal with code merging…
Hunt
  • 8,215
  • 28
  • 116
  • 256
1
vote
1 answer

Problem after git merge: unable to pull because unfinished merge and no staged files

I have merged a branch to master on GitHub and wanted to do a git pull locally after that. When I did a git pull it asked me to commit changes, so I have added files and committed. But something happened, and I am stuck kind of in the middle of the…
seven
  • 1,183
  • 14
  • 33
1
vote
1 answer

How to sync local and remote repositories

After a merged pull request (PR) on GitHub with 3 commits on the remote repository (origin), I performed a pull to update my local repository (main). Somehow the things went wrong, with the standard CI tests failing locally. I reset the local…
Andreas Varga
  • 13
  • 1
  • 3
1
vote
0 answers

Why does git merge and accept both changes in VS Code leave unmatched bracket pairs?

Fairly straightforward question - When I have a merge conflict in a CSS file and use VSCode's 'accept both' option for the conflicting block, I'm often left with a CSS file that has an error right at the end because somewhere in the 10,000 lines,…
Cheetara
  • 529
  • 1
  • 6
  • 19
1
vote
1 answer

PR from release to main has conflicts

Very recently we moved over to a "Git Flow" approach, where we make use of develop, release, and main branches. Recently we created a main branch from the same commit as the most recent release branch. Every time we merge a release branch into main,…
1
vote
1 answer

Pull Request show lot of changes after revert commits

I worked on a branch feature. I wanted to merge it to develop, so I did pull origin develop in feature before. After that, I realized I had to push feature to staging instead of develop. So I revert the last two commit and pushed them to the repo.…
Paul Serre
  • 457
  • 3
  • 11
1
vote
1 answer

No changes to push after merge with branch

I am tying to do something that I have done many times before but for some or other reason it is not working as expected. I want to merge changes from a develop branch into a master branch. First I create a branch of master. git checkout -b…
Arianule
  • 8,811
  • 45
  • 116
  • 174
1
vote
1 answer

Git merge branch delete all my change file

Me and my co-worker usually merge each other branchs before we create merge request .But lastime when he merge my branch i found out there some errors so he do revert his code. The problem right now is that when i merge his branch, all my changes…
Lê VỸ
  • 11
  • 1
1
vote
1 answer

Github - Old commits shows up in new pull request

I created branch A of master branch. I made changes and raised pull request to master branch. When I open New Pull request to master branch, I see too many files changes and previous commit with my changes and commit. I only made changes in 9 files…
Dharmisha Doshi
  • 137
  • 3
  • 9
1
vote
1 answer

How to make git skip some files on merge between branches

I have a docker multi-project, where some files are configuration and bash scripting files .env (eg. facebook_app_id=abcd) build.sh (eg. checkout project with depth 1) install.sh They specify how the different projects communicate together, which…
Zied Hamdi
  • 2,400
  • 1
  • 25
  • 40
1
vote
1 answer

how git always raise a conflict when any changes happened in specific file although the file don't have any conflict when merge

i want a specified file always raise conflict when it have any changes, i search in the internet and i find merge.*.driver in .gitattribute, but this configuration is only effect when this file both changed in two branch, what i wanted is when the…
sdfqwe
  • 11
  • 2
1
vote
1 answer

Rebase or merge a branch onto another feature branch merged in master

I have a feature branching scenario that I'm working on, and I'm a little unsure which way to go as the "best solution." a -- b -- c <-- Master \ d -- e -- f <-- Branch 1 (in…
rafaeldepaula
  • 168
  • 1
  • 1
  • 10
1
vote
1 answer

I merged a branch, and not all commits had been pushed. How to add the remaining commits?

I had a branch. Say there were commits A -- B -- C -- D I pushed it. Then I added more: A -- B -- C -- D -- E -- F I merged. How do I add E and F?
Mykola Tetiuk
  • 153
  • 1
  • 13
1
vote
1 answer

Merge a commit from a branch in repositoryA to a branch in repositoryB

Assuming I have two repositories called repositoryA and repositoryB. I need to merge a commit abcdefgh which is in a branch in repositoryA and called branchA to another branch called branchB and located in repositoryB. in repositoryB: git checkout…