git-merge

Why does git-rebase give me merge conflicts when all I'm doing is squashing commits?

We have a Git repository with over 400 commits, the first couple dozen of which were a lot of trial-and-error. We want to clean up these commits by squashing many down into a single commit. Naturally, git-rebase seems the way to go. My problem is that it ends up with merge conflicts, and these conflicts are not easy to resolve. I don't u...

how can I customize git's merge commit message?

Every time I do a merge I need for a merge commit to be generated and I would like it to have more than just the summary of all the commits. My question is how can I format git-fmt-merge-msg or what determines this automated message (I can do this manually after a commit by amending it and using git-log --pretty=format:'...') For examp...

With git how can i merge a repository that has already been merged?

I have a repository that i pulled the changes for, so now it is up to date with the remote repository. Except that now i realized that i needed to pull all of that repositories changes and keep none of mine. I want to go back in history so that i won't get an "Already up-to-date" when i pull. Also part two, how can i pull and get all of ...

What's the best practice for a git branch that needs master to be constantly merged to it?

I'm working on a project that has basically 2 branches: master and "next-version". The two are constantly changed and the next-version needs to have the latest changes from master, but I can't just merge them both, because one version is published and the other one is still on alpha. I currently merge master to next-version everytime a...

Git merge - trivial merge?

If the base and the source have the same file content, and the destination branch/repo has some other file changes, which content does it keep, the source or the destination file? To explain in detail A | B / \ C D Suppose that a file was added on the A->B edge, and then removed again in B->C, w...

tool for solving "trivial conflicts" in git

Hi, Do you know any tool/switch for git commands which help me prevent conflicts or speed up merges? Currently I often got "trivial conflicts" such this: ++<<<<<<< HEAD ++======= + onClick + onWakeup ++>>>>>>> 587f917... I suppose that that is caused by some white-spaces.. this is very easy to solve by human, however it requires a ...

Resolve selected merge conflicts using p4merge in GIT

Is there a way to resolve selected file having conflicts using p4merge in GIT? Lets say there are 25 conflicts and each conflict has to be resolved by each developer, if any developer runs 'git mergetool' the p4merge which is setup starts with the first conflict. this conflict maynot be related to that developers, so am searching for a ...

Is there a way to keep two branches from merging in git

I would like to be able to keep two separate branches in a git repo that cannot accidentally be merged even though the branches may contain similar content. Is there a trick for forcing a branch to remain separate in git? That is assuming I have branch A and branch B, something like git merge B //assuming A is checked out would fail. ...