merge-conflict-resolution

How to find out parent revisions of an in-progress merge?

拜拜、爱过 提交于 2019-12-11 03:08:47
问题 I've started a merge, but it had conflicts which I've resolved, and now it's all staged ready for commit. I just want to double-check which parent revisions I've merged. Things tried so far: git show with the %P format specifier - except I cannot figure out how to get it to tell me the parents of the uncommitted merge git rev-list with various options, to no avail googling for a git equivalent to hg parents , which brings me back to git rev-list but with no success: it lists five revisions,

Setting to make TFS force you to resolve conflicts before checking in?

泄露秘密 提交于 2019-12-11 01:26:40
问题 I just started using TFS last week in a new job. My previous experience has primarily been with Subversion and one thing I liked about Subversion is that it forces you to get latest before checking in anything that would be conflicting. Furthermore, you have to resolve conflicts (or explicitly mark them as resolved even if they aren't really). In TFS it seems like people are inadvertently wiping out other people's changes from time to time when 2 people have worked on the same file. I'm sure

Merge conflict in a file that wasn't modified in either branch

↘锁芯ラ 提交于 2019-12-10 16:35:47
问题 When I try to rebase branch featureX on master , I get a conflict in a file (let's call it moduleA/foo ) that was not modified in either master or featureX since they diverged! I checked that with the following log command: git log master...featureX -- moduleA/foo and the result was empty (no commit on either branch touched the file since the branches diverged). How is this at all possible and what can I do to avoid such misleading conflicts? 回答1: As @Xlee said, rebase can result on changing

Github thinks branches are different after merge

丶灬走出姿态 提交于 2019-12-10 15:57:09
问题 I've banged my head against the wall with this Github issue enough to finally come here for help. My repo has two branches of interest: master , which is the currently live release branch, and alternate-testing , which is exactly what it sounds like. Our dev process has feature branches regularly branched (and forked) off alternate-testing , then merged back into alternate-testing . Finally, alternate-testing is periodically merged into master . Note that the testing branch is the gatekeeper

Mercurial merge awesomeness - what am I missing?

怎甘沉沦 提交于 2019-12-10 12:54:19
问题 I've been using Mercurial for a while, and there's one "fact" that is given many times. In fact, it hit me while watching a video made by Fogcreek yesterday, this video: Fog Creek Kiln: Unlock the power of DVCS for your company that there seems to be something that doesn't work for me here. At around 1:39 in that video and onwards it makes a point of saying that while other version control systems tracks revisions (ie. snapshots), DVCS' like Mercurial track changesets (ie. what happened

git merge conflict due to renaming in two branches - how to fix & avoid in future?

醉酒当歌 提交于 2019-12-09 08:30:03
问题 I have two local branches master and dev . Both branches contained three folders: projectBeta project project_v1 I wanted to just keep projectBeta and remove project and project_v1 and then rename projectBeta as project . So that's what I did separately on both branches, committing as I went along. All looked good until I tried to then merge the dev branch to master, and I got a pile of these kinds of errors: CONFLICT (rename/delete): Rename projectBeta/test.c->project/test.c in dev and

How to solve merge conflict in a approved review in gerrit?

只谈情不闲聊 提交于 2019-12-08 05:46:14
问题 I made a change in gerrit which was code reviewed and after 7 revisions approved. But, now it cannot be merged and trying to rebase in gerrit website is not working due to merge conflict. How can I resolve this merge conflict and merge the same approved change and not create a new one. (Full steps from cloning the repo would be appreciated.) 回答1: 1) Clone the Gerrit repository git clone https://USER@GERRIT-SERVER/a/REPO-FULL-PATHNAME 2) Go to the change page on Gerrit and copy the checkout

Git is not showing any conflicts, and is overwriting my local copy

佐手、 提交于 2019-12-08 00:31:29
问题 My routine on git has always been very simple: git add -A git commit -m 'the changes I made' git pull # resolve conflicts git push However, for some unknown reasons, despite lots of conflicts with the origin, after pulling, I don't get any conflicts and without my permission it force updates my local copy. Something along these lines: '2 files changed, 2 insertions(+), 6 deletions(-)'. But in my case, conflicts shouldn't be resolved from simple merge and should require manual conflict

Can I merge only non-conflicting changes in Git?

自作多情 提交于 2019-12-07 17:35:44
问题 How can I simply (e.g. in one command?) merge in Git, keeping the state of conflicting files as in the current branch and without specifying each file individually as in theirs/ours options? git checkout master git merge stable --some-option-to-keep-files-? 回答1: The merge strategy has an "ours" option which is what you want git merge -s recursive -X ours remote/branch As the manpage stresses out, this is NOT git merge -s ours. 来源: https://stackoverflow.com/questions/12572530/can-i-merge-only

Git Merge - Binary File Conflict Resolution

流过昼夜 提交于 2019-12-07 14:24:43
问题 How do I resolve a binary file conflict resolution during a merge operation in git? Here's what I've done so far: git checkout master git fetch origin git merge working_branch ... [Conflicts] ... git status ... Unmerged paths: both modified: Path/file.dll ... I want to keep the version in the working_branch and discard the version in the master . How do I do this? 回答1: Figured it out earlier today: git checkout --theirs Path/file.dll git add Path/file.dll git commit -m "Resolved merge