Questions tagged [merge]

Merging is a generic term for combining two or more related sets of data. It is commonly associated with revision control systems when reconciling multiple changes made to a revision-controlled collection of files. Merging multiple data sets is another use of this tag.

Most often, it is necessary when a file is modified by two people on two different computers at the same time. When two branches are merged, the result is a single collection of files that contains both sets of changes.

In some cases, the merge can be performed automatically, because the changes do not conflict. In other cases, a person must decide exactly what the resulting files should contain. Many revision control software tools include merge capabilities.

Merge can be used as a verb ("to merge branches"), but can also be a noun ("this merge will be difficult").

Merging multiple data sets is another use of this tag.

Merge can also refer to the Ruby Hash#merge method for merge hashes or git merge command for git revision control system.

Merge is different from join in datasets which is primarily SQL based. Difference between merge and join for SAS is here http://www2.sas.com/proceedings/sugi30/249-30.pdf and for R is here How to join (merge) data frames (inner, outer, left, right)?

See Wikipedia: Merge Version Control.

24925 questions
7
votes
1 answer

merge results in more rows than one of the data frames

I have two data frames, the first contains 9994 rows and the second contains 60431 rows. I want to merge the two data frames such that the merged data frame contains combined columns of both data frames but only contains 9994 rows. However, I get…
tubby
  • 2,074
  • 3
  • 33
  • 55
7
votes
2 answers

Manual merge on GIT

I develop in a proprietary script language with very resumed code in which most configurations are contained inside the code itself. The obvious problem would be the differences in the code itself between test and production environments and that's…
filippo
  • 5,583
  • 13
  • 50
  • 72
7
votes
2 answers

"unpack failed: error Missing commit" but commit exists

After long hours of searching for this specific problem, i didn't find another solution but post a question here: Scenario: Two remote servers: git.address-a.com and git.address-b.com One local repository with two remotes: origin to…
Diogo Paschoal
  • 1,507
  • 1
  • 14
  • 16
7
votes
5 answers

merge contents of two files into one file in bash

I have two files which has following contents File1 Line1file1 Line2file1 line3file1 line4file1 File2 Line1file2 Line2file2 line3file2 line4file2 I want to have these file's content merged to file3…
user3784040
  • 111
  • 1
  • 1
  • 10
7
votes
1 answer

Undoing a merge done with --no-ff

I've heard that a git merge done with the --no-ff flag preserves full history making it easier to pull out a specific merge. I've not seen it explained, though, how to undo a merge made with --no-ff. Also, I can't see how it makes it easier to…
blogofsongs
  • 2,527
  • 4
  • 21
  • 26
7
votes
1 answer

Merge data.table by two nearest variables

I have two data tables with x,y coordinates and some other info which I would like to merge based on nearest neighbour distance, i.e. on the minimum in squared difference of both x and y (dx_i =min ([(x_i-x_j)^2+(y_i-y_j)^2]^0.5). Say I have the…
Michiel
  • 179
  • 1
  • 14
7
votes
2 answers

How do I determine if svn:mergeinfo is corrupt and how would I fix it?

I suspect I have corrupt mergeinfo but I'm not sure. Does anyone know how I'd make a determination and what resources are out there to help fix problems? Here’s the issue. My team recently moved to agile and uses feature branches (story branches…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
7
votes
1 answer

How do you get a Subversion diff summary to ignore mergeinfo properties?

I have the Subversion 1.6.5 client and 1.5.4 server. And I mostly only care about diffs on fully repository paths, not working copies. When diffing branches, ones that have been merged already show up as identical except for the mergeinfo…
Gordon Wrigley
  • 11,015
  • 10
  • 48
  • 62
7
votes
3 answers

Add missing rows to data.table according to multiple keyed columns

I have a data.table object that contains multiple columns that specify unique cases. In the small example below, the variables "name", "job", and "sex" specify the unique IDs. I would like to add missing rows so that each each case has a row for…
itpetersen
  • 1,475
  • 3
  • 13
  • 32
7
votes
1 answer

pandas merge with MultiIndex, when only one level of index is to be used as key

I have a data frame called df1 with a 2-level MultiIndex (levels: '_Date' and _'ItemId'). There are multiple instances of each value of '_ItemId', like this: _SomeOtherLabel _Date _ItemId 2014-10-05 …
Charles
  • 613
  • 2
  • 8
  • 18
7
votes
4 answers

Merge two CSV files based on a data from a column

I have two csv files like below. CSV1 data13 data23 d main_data1;main_data2 data13 data23 data12 data22 d main_data1;main_data2 data12 data22 data11 data21 d …
abn
  • 1,353
  • 4
  • 28
  • 58
7
votes
1 answer

Java and YAML: how to parse multiple yaml documents and merge them to a single YAML representation?

Let's say I have one file, defaults.yaml: pool: idleConnectionTestPeriodSeconds: 30 idleMaxAgeInMinutes: 60 partitionCount: 4 acquireIncrement: 5 username: dev password: dev_password and another file, production.yaml: pool: username:…
Les Hazlewood
  • 18,480
  • 13
  • 68
  • 76
7
votes
2 answers

merging selected revisions from one branch on another in Mercurial

Is it possible to merge a range of revisions from one branch to another in Mercurial? e.g. |r1 |r2 |r3 |\___ | | r5 | | r6 | | r7 | | ... | | r40 |r41 If I want to merge revisions 6 & 7, but not 5, into the main branch - is this…
Assaf Lavie
  • 73,079
  • 34
  • 148
  • 203
7
votes
3 answers

Pull request merged, closed, then reverted - now can't pull the branch again

GitHub seems to be a bit lost after a couple of operations - and I certainly am... So, here is the story: I am new to git, and new to github. In my repository I had a branch (let's call it B) where I was working on a feature. To make things…
mmagnuski
  • 1,249
  • 1
  • 11
  • 23
7
votes
4 answers

Merge a hash with the key/values of a string in ruby

I'm trying to merge a hash with the key/values of string in ruby. i.e. h = {:day => 4, :month => 8, :year => 2010} s = "/my/crazy/url/:day/:month/:year" puts s.interpolate(h) All I've found is to iterate the keys and replace the values. But I'm not…
LazyJason
  • 71
  • 2