git-merge

Setting up SourceTree to merge unity3d scenes with UnityYAMLMerge

大憨熊 提交于 2019-12-23 20:34:14
问题 SO I followed the instructions from here and tried to set up a merge for scenes in unity. The instructions about SourceTree are right at the bottom. I added the merge tool provided by unity as a custom merge tool, but when I try to merge a branch that changed the scene into my branch I get a conflict and the merge fails. I'm a total noob at this thing and don't know what to do now. Is it possible to make it automatic or I have to write some stuff in the terminal and if I do what should I

How to fix conflicts in git?

£可爱£侵袭症+ 提交于 2019-12-23 12:03:05
问题 When I try to pull I have the following message: Automatic merge failed; fix conflicts and then commit the result. So, I try to fix conflict (as git suggest) for that I follow these instructions. Among the first things that I need to do is to open the "problematic" file in a text editor and find lines like that If you have questions, please <<<<<<< HEAD open an issue ======= ask your question in IRC. >>>>>>> branch-a The problem is that I do not see things like that in my file. In particular

Git: after preparing a real merge commit, how to create a simple commit?

瘦欲@ 提交于 2019-12-23 09:14:54
问题 After invoking git merge --no-commit <commit> , performing a commit will result in a merge commit with two (or more) parents. What command to invoke to create a simple commit instead (without having to re-perform the merge command with the --squash option)? 回答1: According to the git-merge man page, the --squash option does not record $GIT_DIR/MERGE_HEAD . $GIT_DIR/MERGE_HEAD is responsible for creating merge commits; you can see this in the Git sources, file builtin/commit.c : in_merge = file

Which commit hash to undo a pushed merge using git-revert?

拈花ヽ惹草 提交于 2019-12-23 08:45:48
问题 I merged the beta branch into the master branch. I pushed to origin. I now want master to be as it was prior to the merger both locally and remotely. A good answer for undoing a merge that was already pushed suggests git revert -m 1 commit_hash If this is indeed the way to go, how can I determine commit_hash ? I unsuccessfully tried the hash returned by merge-base: $ git merge-base --all master beta 1f4b949b7ef97abf913ae672e3acd0907abfac1b $ git revert -m 1

git added by them renaming conflict - git recognises the same files in the renamed directory as new files

被刻印的时光 ゝ 提交于 2019-12-23 04:04:35
问题 I've renamed a directory and merged it into my main branch, when merging another branch, git recognises the same files in the renamed directory as new files. I get the merge conflict 'added by them' for the same files in that directory when merging in another's branch: added by them: theirDir/same_file_name.xxx I've renamed the directory in their branch to match and continue to get the 'added by them' conflict. When I try to checkout --ours I get $ git checkout dir/same_file_name.xxx --ours

How to check if a pull request is merged in some branch of the target repository?

落花浮王杯 提交于 2019-12-23 02:31:49
问题 Excuse me but this may be a noob question but it jsut crossed my thoughts and I think it is worth to fix my ideas and get a relevant explanation from some experts. I remember (I may be wrong) that when I submitted some pull requests to some repository, when the PR is merged to the master (or other branch), I'm notified about that action and when accessing the PR url I can see a sort of This PR has been merged into... message. Just browsing an old issue, I can no more see that kinf of message

git-flow finish release - selective merge

随声附和 提交于 2019-12-22 18:09:49
问题 We've recently started using git-flow in our company, and we've came across the following issue: We have a DEV_MODE boolean that controls the level of logging in the app, we want the develop branch to always have DEV_MODE=true . However, when releasing a version we change the DEV_MODE to false . When I do finish-release in git-flow , it'll merge the DEV_MODE=false into the develop branch. I there a hook I can use to prevent this, or maybe a way to tell git how to merge files from release

Is it possible to do a partial merge with --ff-only changes?

二次信任 提交于 2019-12-22 12:55:09
问题 I have a local branch that needs to be merged with the remote. Both remote and local branches have lots of different commits (on various files). Is it possible to identify and merge the files which have only fast-forward type (remote-side) changes? I would like to deal with all the other changes manually. git merge --ff-only does not merge anything when there is any two-sided changes. Edit: I would like to make the question more clear. Let's say the original files (on parent node) are file1,

Why can’t you merge in a bare git repo?

回眸只為那壹抹淺笑 提交于 2019-12-22 09:13:51
问题 Why can’t I merge into a bare repo? Bare repos don’t have a HEAD or a working tree. In the config file we can see bare=true . You also can’t pull in a bare repo (because pull = fetch & merge and merge doesn't work). However, you can push to a bare repo – why? As far as I know, push also contains a merge, but in this case we can do it well. So, the question could be “how does git merge work?”. Why does it need a HEAD ? What is it doing when merging? 回答1: As Chronial points out, pushing does

How to mass-resolve Git Conflicts with only File Mode changes?

狂风中的少年 提交于 2019-12-22 08:18:19
问题 I am trying to merge two repositories, and there are only a couple of "real" conflicts, but there are about 70 file conflicts of "Both added". When viewing a git diff, however, it only shows file mode changed. What would be the best way to mass-accept the current file mode and ignore the incoming file mode? A little background: These 2 repositories are of the same code, but one has been tracked through SVN, so doesn't have a history. I'm using git-svn to track it now and merge it with the