git-merge

git resolving previous merge conflicts [duplicate]

梦想与她 提交于 2019-12-25 05:47:09
问题 This question already has answers here : Git merge left HEAD marks in my files (5 answers) Closed 2 years ago . Once I've merged my branch with another. I haven't resolve the conflicts that were made. I have been merging till recently, till I figured out that lots of "<<<<" were added to my code. I believe it's related to the unresolved merge conflicts. I try to solve the conflicts in my last merge with "theirs" strategy. Unfortunately, it didn't have any effect on the previous unresolved

Git merge strategy for a specific file depending on rebase / merge

為{幸葍}努か 提交于 2019-12-25 04:14:15
问题 I'm looking for a way to make git use a specific merge strategy (ours / theirs) for a specific file depending whether I am merging or rebasing my feature branch. Let me explain: imagine I have a feature branch 'fb' with changes to a file ".mvn/maven.config". If I merge master into 'fb' I want to keep my file so use the 'ours' strategy (I can define it in the .gitattributes file). But if I rebase 'fb' onto master (instead of merging), I still want to keep my ".mvn/maven.config" of the 'fb'

git pull merges no files if any of the deltas are conflicted (need manual merge)

青春壹個敷衍的年華 提交于 2019-12-25 02:41:19
问题 Please consider this scenario: I made a change of X number of files, pushed into Gerrit Joe makes a change of Y number of files, Z of which intersect with my change set Joe's code review gets approved and gets merged into the remote branch, mine gets held in the code review stage Because Joe and myself changed a Z number of files simultaneously and his changes got approved before mine, I have to merge my changes into the Z files that Joe changed also I am in the same git branch I was in when

Keeping repositories in sync without being able to push and pull commits

喜夏-厌秋 提交于 2019-12-24 13:21:54
问题 As of right now, I cant use an git server, so I use one of my favourite git features which is turning any directory in my computer into a git repo ( just the git init thing). I use to do this because I was the only one coding and I could keep track of my own stuff. Now things have changed a bit and I'm working with a small team. Some other things however did not change and I still cannot have a git server therefore the local repos are still the only option. The most straight forward procedure

How do I make gvimdiff opened by git mergetool open all files at once in tabs?

烈酒焚心 提交于 2019-12-24 09:35:30
问题 Normally git -c merge.tool=gvimdiff mergetool opens files to be merged on by one, in batch mode: Normal merge conflict for '...': {local}: modified file {remote}: modified file 4 files to edit ... seems unchanged. Was the merge successful? [y/n] n merge of ... failed Continue merging other unresolved paths (y/n) ? y Normal merge conflict for '...': {local}: modified file {remote}: modified file 4 files to edit modules ... seems unchanged. Was the merge successful? [y/n] n merge of modules ...

Do I need to merge a branch in a bare repo?

孤街醉人 提交于 2019-12-24 05:49:32
问题 In my setup I have three repos: A bare repo on remote server ( /op/git/proj.git ) A non-bare repo on remote server ( /var/www/proj/.git ) A non-bare repo on local machine ( /var/www/proj/.git ) The bare repo is origin to both ordinary repos on local and remote. Whenever I do a commit on local, I do a local push to bare repo and then pull on ordinary remote repo and I get my changes on remote. Now, I want to merge branch A to master which method should I use? (Assume master is the current

Tell Git to stop prompting me for conflicts when none really exist?

ⅰ亾dé卋堺 提交于 2019-12-24 03:37:31
问题 In the image below, all the files listed by Git are the same exact files that are remote. I used SCP to copy them to BSD for testing before committing. Once the platform tested OK, I committed on another machine: I can't stress enough that these files are exactly the same , no conflict exists , and there is nothing to merge . I tried to use git pull -s theirs , but I got an error about non-existent merging strategies. I can't use git reset --hard HEAD because I have other changes that are in

Git merge conflicts on files that are changed by one branch only

◇◆丶佛笑我妖孽 提交于 2019-12-24 01:27:36
问题 I have a fork of zprezto at http://github.com/ohcibi/prezto To reproduce my problem: git clone http://github.com/ohcibi/prezto cd prezto git checkout ohcibi (i have a branch with that name, no typo here!) git merge master A bunch of conflicts are shown The commit log shows that there are only 3 commits in ohcibi that are new since the last merge commit which is around april 26th. All 3 of the commits do not touch any of the files that conflict (except one file where the confict is to be

Merge strategy for whitespace only changes?

半城伤御伤魂 提交于 2019-12-24 01:20:00
问题 I did a code format in master branch. It mainly fixed whitespace issues like: formatting tab space lengths, adds and removes newlines before and after braces. The problem is, when I try to merge master from other branches I get a lot of conflicts. Is there some strategy to bring in whitespace changes to other branches? 回答1: From the docs of git merge, I would assume that git merge -s recursive -Xignore-space-change could be used to achieve this. You might also want to play around with

Can I make `git merge` always conflict on file changes?

你离开我真会死。 提交于 2019-12-24 00:28:43
问题 I am hoping I have a simple question for you, but I can't find an answer anywhere (I have been searching for 2 days, maybe I am dumb?). I am trying to develop a git workflow to collaboratively edit LaTeX files with my PhD adviser. The problem we face is due to the behavior of git merge (because it merges automagically). I want git to conflict anytime it sees a file change, even if it is an addition, subtraction, or minuscule change, is this possible? This way we can both pick and choose