git-merge

Git merge flattening

If I am working in multiple branches on a single feature, I use git pull branch1 branch2 branch3 to pull all the changes into my master branch. However, all the commit logs of each branch are copied as well. How do I flatten the commit log down to a single message? ...

How to make git merge handle uncommitted changes to my working tree?

A co-worker and I are both working on the master branch at the moment. I have some code in my working tree that I don't want to commit (debugging statements and the like). Now if he commits changes to some of those same files, I can't merge them: $ git merge origin/master Updating 1b8c5c6..eb44c23 error: Entry 'blah.java' not uptodate...

How do I tell git to always select my local version for conflicted merges on a specific file?

Say I'm collaborating with someone via a git repository, and there is a particular file that I never want to accept any external changes to. Is there any way for me to set up my local repo to not complain about a conflicted merge every time I git pull? I'd like to always select my local version when merging this file. ...

To git checkout without overwriting data

How can you git-checkout without overwriting the data? I run git checkout master I get error: Entry 'forms/answer.php' would be overwritten by merge. Cannot merge. This is surprising, since I did not know that Git merges when I git-checkout. I have always run after the command separately git merge new-feature. This seems to be ...

git-merge with repository on local filesystem

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 tw...

What is a trivial merge in git?

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. ...

Merge two identical git-svn branch HEADs without losing link with git-svn remote branch?

I've got a pair of git-svn branches which have been manually kept in sync by applying patches and what-not; git-merge has not been used. The branches are now in sync, which is to say that git diff A B has no output at all. [A] +----+--+--+--+--------+---+--------+-+---+-> \ / X / / \ \ X / / / \ X [B] --+-----+----...

How to push/pull Git rebase

I'd like to use git rebase so as to cleanly merge a feature in the master branch (in less commits or at least at the top of the change log). Note that I'm the only one working on the repository. After reading http://stackoverflow.com/questions/457927/git-workflow-and-rebase-vs-merge-questions, I found git rebase would be pretty nice and...

Strange git merge issue

This is how gitk currently looks in one of our projects: https://dl.dropbox.com/u/2582508/gitk.png This apparently, from all we can tell, happened after a single "git merge" was done with a remote branch - we're not sure why or what is going on. Any idea what happened here? More importantly, what's the best way to fix it? Those merge ...

git: merge two branches: what direction?

Hi, We have the following situation: A --- B --- C --- ... --- iphone / ... --- last-working --- ... --- master Between last-working and iPhone, 32 commits were made. Between last-working and master, a lot of commits were made. What I want now is a new branch where I have iphone and current master merged to...

Git branch unknown to local clone

I have a git repository with two branches. If I clone my repo I can only see the master branch. I have both branches up to date. The problem is I don't fully understand merging and branching. Darn it! My example can be seen here: http://github.com/rimian/rimian/network Can anyone tell me how to get this back to normal? ...

How Do You Get the bufspec While Using Vimdiff Through Git

I've read Vimdiff and Viewing differences with Vimdiff plus doing various google searches using things like "vimdiff multiple", "vimdiff git", "vimdiff commands" etc. When using do or diffg I get the error "More than two buffers in diff mode, don't know which one to use". When using diffg v:fname_in I get "No matching buffer for v:fn...

TeamCity and pending Git merge branch commit keeps build with failed tests

We use TeamCity for continuous integration and Git for source control. Generally it works pretty well - convenient, modern and good us quick feedback when tests fails. There is a strange behavior related to Git merge specifics. Here are steps of the case: First developer pulls from master repo. Second developer pulls from master repo....

How Do I 'git fetch' and 'git merge' from a Remote Tracking Branch (like 'git pull')

I have set up some remote tracking branches in git, but I never seem to be able to merge them into the local branch once I have updated them with 'git fetch'. For example, suppose I have remote branch called 'an-other-branch'. I set that up locally as a tracking branch using git branch --track an-other-branch origin/an-other-branch S...

How to merge two branches with the Mac OS X git client Gity

I'm having trouble merging two branches with Gity. When I do a checkout on my alternative branch and click: "Merge into master" nothing seems to happen... Any thoughts? ...

Does GIT have evil twin issues?

In ClearCase evil twin occurs when two files are found with the same name in two different versions of the directory, and If the element OIDs are different but the names are the same. In GIT the SHA1 id is always unique and file with same name always have different SHA1 id’s. We don’t have a concept of Evil twins, but there are likely ...

Tell git not to merge binary files but to choose

When the binary files, swfs, jars and flvs are changed locally, and I try to pull in changes, git tries to merge them and reports conflict. And then, I branch to a temporary branch, and commit the local changed binary files, and merge them back after the pull with recursive theirs strategy. -- Too much work. Is there a way to tell git,...

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

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)? ...

git rename/delete confusion

I having one confusion about a particular git behavior: Following are the steps and situation (the list of commands are also given later): I have two branches: master and XBranch There is a file src/a.txt in both of them. It's content is "Old Content" In XBranch I rename src/a.txt to src/b.txt, using: mv, git rm, git add. In master r...

How to setup a git driver to ignore a folder on merge

Hi all, I've already did an extensive search, read a lot of SO questions and solutions and tried it different ways, but I've been unable to do what I want, which is fairly simple. I have the master branch, where all the main code resides, and the design branch, where the layout of the rails application is built by the design team. They...