Tag: git-merge

How to merge files from one branch's directory into another branch?

Simple example. This is ‘master’: root – index.html – readme.md This is a branch called ‘dev’: root src – index.jade dist – index.html I’d like to take the index.html file (or all files, really) in the ‘dist’ folder of the ‘dev’ branch and replace or merge it with the one in the root directory of […]

Git Merge branch 'master' of https://bitbucket.org/xxx/yyy

We have come to git after using SVN for years and at times, I must admit, it is confusing. Take the following example – User1 makes a change to a.java and pushes to the remote server. User2 makes a change to b.java. He can’t push straight away (a deviation from SVN but that is OK). […]

git-flow finish release – selective merge

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, […]

Can git figure out that the branch to be merged has obsolete changes?

I am new in git and I am find it hard to wrap my head around the fact that everything is around snapshots/commits and not individual files. So assume that I have a tree in my repository as follows. C4 (HEAD,Master,Origin/Master) * C3 * C2 * C1 Now I branch out from here: B1 (HEAD, […]

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

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 […]

Merge using EGit results in commit of all changes as done by the merger

I’m using Eclipse with EGit and and my origin/master is on github. On this project are working 3 programmers. When I pull changes to my local git (using EGit) and there are conflicts I solve them, no problem. The thing is that when I commit, it commits a merge that includes all the changed files […]

Can I merge only non-conflicting changes in Git?

How can I simply (e.g. in one command?) merge in Git, keeping the state of conflicting files as in the current branch and without specifying each file individually as in theirs/ours options? git checkout master git merge stable –some-option-to-keep-files-?

Local Git branch has diverged from origin following an interactive rebase

I have a local branch (CRM-ayrshireminis) that has a couple of commits on it that I have pushed to the origin (origin/CRM-ayrshireminis). This branch was created from the develop branch about one week ago, on which there have been one weeks worth of work from other collaborators. What I want to do is rebase the […]

Git merge ignore spaces

Possible Duplicate: git whitespace woes How can I setup get to not report conflicts purely due to whitespace on a merge, like the following ? <<<<<<< HEAD open RESDBFILE, “< $this_day_result_file_”; while ( my $resdbline_ = <RESDBFILE> ) { my @rwords_ = split ‘ ‘, $resdbline_; if ( exists $uncaliberated_strategies_{$rwords_[0]} ) { # if this […]

How to resolve ALL conflicts using HEAD, with any mergetool

So for some reason I’m getting a lot of conflicts with a new merged hotfix. The file that was actually [manually] changed has no conflict. All the conflicts are in files that were untouched during the fix and apparently its an issue with whitespaces. I’ll try to figure that problem later but now I need […]

Git Baby is a git and github fan, let's start git clone.