git-merge

Git subtree merge strategy or subtree command?

こ雲淡風輕ζ 提交于 2019-12-05 01:33:05
问题 I'm starting a new Zend Framework project in which I will collaborate with a designer. I'm going to maintain this project code using git and usually designers don't speak git (or any programming language) so I wanna make things easy for him, otherwise I'm afraid he won't use git at all. My plan is to give him some Git gui and with that he should use only basic git features such as commit, diff, fetch, merge, push and pull. I'm using gitolite to maintain the shared copy of our git repository

How to check mergeability of a branches using the github api

老子叫甜甜 提交于 2019-12-05 01:25:31
I'm trying to check if branch can be merged to another using the github API. There is a property mergeable in GET /repos/:owner/:repo/pulls/:number , but I don't actually want to create a pull request before I know that branches can be merged w/o conflicts. On the github website, when creating a pull request, there is a call to this address which doesn't seem to be an API method (it returns HTML saying whether branches can be merged or not). But still I could use this call, the problem is I have no clue what '1373893022922' refers to. I'd suggest it's somehow connected to the base branch

git blame: correct author after merge

我怕爱的太早我们不能终老 提交于 2019-12-05 01:17:05
A GIT merge introduces a new commit. This causes problems with "git blame": the merged lines appear to be committed by the developer that did the merge. I can understand this being the case for conflicting changes (because he solved the conflicts). But is there a way to not have this happening for non-conflicting lines? Some option to "git blame"? If there is no way around, this would basically make "git blame" almost useless when you have a lot of merges - and GIT encourages a lot of merges. Does SVN have this issue with non-conflicting merges? I don't think so, but I may be wrong as I

What is a trivial merge in git?

浪子不回头ぞ 提交于 2019-12-05 00:56:47
Sometimes when I do a pull instead of a rebase after a simple one file change commit I see the following in the master log: Trivial merge But there's no diff of what changed? What's the point of this log message? Did anything change I don't know of? It scares me. git doesn't insert this message into the log at any point. I'm going to take a wild guess and assume that you've seen this message in gitweb. gitweb prints this message if there is no output from a combined diff. This happens when the only differences were all in chunks were only one side of the merge changed, and this change was

Why is it resulting in a merge conflict?

梦想的初衷 提交于 2019-12-04 20:53:36
问题 This was the initial snapshot of my git repository On branch master , file m1 contains L1 On branch dev , file m1 contains L1 L2 If I try to merge dev from master , it results in a conflict. $ git checkout master Switched to branch 'master' $ git merge dev Auto-merging m1 CONFLICT (content): Merge conflict in m1 Automatic merge failed; fix conflicts and then commit the result. $ git diff diff --cc m1 index 078f94b,9f46047..0000000 --- a/m1 +++ b/m1 @@@ -1,1 -1,2 +1,5 @@@ L1 ++<<<<<<< HEAD ++=

Merge changes from one repo to another with different tree structures

本秂侑毒 提交于 2019-12-04 17:37:16
问题 I have two Git repos, foo/master and bar/master: In foo: code_root ->dirA ->dirB -> *some files* In bar: code_root -> *same files as above* Now someone has made changes to *some files* ... how do I get those changes merged into *same files as above* ? When I say "merged" I mean I need the history (commit messages, log hashes etc.) of the deltas to come over as well. 回答1: You can split the changes out to the subtree level, and then merge with your other branch: # from your foo project git

git-merge with repository on local filesystem

a 夏天 提交于 2019-12-04 17:03:33
问题 For some context: I just upgraded Ubuntu which broke my existing gitosis installation (see here: bug #368895), and have just reinstalled gitosis from packages. I now want to migrate my whole config and set of repositories from the old gitosis installation (which still exists and can be pulled from but is otherwise broken). I now have two gitosis-admin directories locally, one for each gitosis installation. One has a full history, the other's is empty. I want to pull across this history. Here

git - strange branch merge error that I am not sure how to solve

江枫思渺然 提交于 2019-12-04 16:37:00
问题 When I git status, I get this error message: # On branch master # Your branch and 'origin/master' have diverged, # and have 1 and 2 different commits each, respectively. # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .gitignore nothing added to commit but untracked files present (use "git add" to track) So I can't pull or push. When I pull I get this: macoss-MacBook-Pro-10:Marketing owner12$ git pull origin master Password for 'https://genadinik

Resolve git rebase conflicts the same way they were resolved previously

ε祈祈猫儿з 提交于 2019-12-04 16:31:28
I've decided to retrospectively commit a history, that was never in Git, from an other old version control system. So I've created an orphan branch "newroot", and imported commits from the other version control system to it. Following question Insert a commit before the root commit in Git? The "newroot" branch ended up with files exactly matching the root commit of the "master" branch. Now I want to rebase the "master" branch onto the "newroot" orphan branch, like: git rebase --onto newroot --root master The problem is that I get prompted to resolve all merge conflicts. There are hundreds of

git merge not creating merge commit, no MERGE_HEAD [closed]

℡╲_俬逩灬. 提交于 2019-12-04 15:50:08
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Using Git 1.8.1.2 on Linux, I have been working on two different branches based on master in parallel (call them A and B), and also created a third branch (call it M) which merges those two branches—so far with no non-merge commits of its own. After doing some work on one of the “primary” branches (A), I checked out the merge branch ( git checkout M ), verified that it already had everything in B ( git merge B