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.

21355 questions
6
votes
1 answer

Angular 1.3.14 merge(dst) does not exist

I am baffled by this one. In the angular api and on github there is a merge function which does a deep merge on two objects, unlike extend() which does a shallow copy. I use google's cdn for angular, and call angular.extend('param') works, but…
Gerardlamo
  • 1,035
  • 10
  • 19
6
votes
1 answer

Find the merge commit that modified a given line?

We're using a git-flow style workflow, and we want to find out which pull request included changes to a given line of code. Suppose we have the following history: c---e---g / \ -a---b---d---f---h--- master My pull request was…
Wilfred Hughes
  • 26,027
  • 13
  • 120
  • 177
6
votes
2 answers

Git reset behavior

I have the following situation: The master branch had a stable version of application. Developer A recently made a feature-branch called branch-a with several commits (let them be a-1, a-2, a-3). Implemented features here are based on up-to-date…
Andrey Pesoshin
  • 1,096
  • 1
  • 12
  • 30
6
votes
1 answer

Move one Git repo into a subfolder of another with branches

I have a Git repo Old that I want to move into a subfolder sub of an existing Git repo New. I have two branches, master and feature, within Old that I want transferred over as well; Old\master should just merge into New\master, and there should be a…
Stephen Cleary
  • 376,315
  • 69
  • 600
  • 728
6
votes
2 answers

jQuery merge table rows, but take previous columns into account

I have a table in html. The table utilizes generic tr's and td's... and makes a dynamic table with six columns and a variable number of rows. If a given table looks something like this: |column 1|column 2|column 3|column 4|column 5|column…
newuser
  • 173
  • 1
  • 3
  • 13
6
votes
4 answers

Accept all merge conflicts in git

I'm trying to do a merge and there's a bunch of conflicts. It's all generated files so what I want to do is basically say "ignore all merge conflicts, and check everything in from my own repo". I've tried git checkout . --ours git add -A git com…
Micah
  • 101,237
  • 81
  • 221
  • 320
6
votes
1 answer

Merge matrices from two lists in R

Suppose I have two lists that include several matrices. The first list includes matrices with dimensions that differ from matrix to matrix: Code to create…
jsts
  • 259
  • 1
  • 8
6
votes
1 answer

Git: Selecting a subset of changes for a release

I'm attempting to work out the best way in which to select a subset of commits from one branch to another with minimal affect on history (such as duplication of commits) for my particular workflow. Here's a description of my workflow, plus the…
ChrisC
  • 2,385
  • 1
  • 14
  • 25
6
votes
1 answer

Is it possible to use column indices in merge?

If I have two dataframes that I wish to merge, is there a way to merge by the column index rather than the name of the column? For instance if I have these two dfs, and want to merge on x.x1 and y.x2. dtest <- data.frame(x1 = 1:10, y = 2:11) dtest2…
ben890
  • 1,068
  • 2
  • 14
  • 37
6
votes
0 answers

why do files I didn't touch become merge conflicts after a pull

I was working on a branch. I made some changes to a file person.cs that I wanted to apply to a co-worker's branch. Last week I had been working on his branch, but lately I have been working on my own branch. I switched to his branch and pulled…
thepaulpage
  • 4,449
  • 2
  • 22
  • 38
6
votes
7 answers

How can I merge several hashes into one hash in Perl?

In Perl, how do I get this: $VAR1 = { '999' => { '998' => [ '908', '906', '0', '998', '907' ] } }; $VAR1 = { '999' => { '991' => [ '913', '920', '918', '998', '916', '919', '917', '915', '912', '914' ] } }; $VAR1 = { '999' => { '996' => [] } };…
Nick
  • 191
  • 9
6
votes
1 answer

Merging multiple array then sorting by array value count

Please help me, i need to merge multiple arrays then sorting it by array value count. Below is the problem: $array1 = array("abc", "def", "ghi", "jkl", "mno"); $array2 = array("mno", "jkl", "mno", "ghi", "pqr", "stu"); $array3 = array_merge($array1,…
Sofyan Sitorus
  • 77
  • 1
  • 2
  • 6
6
votes
2 answers

Use multiple materials for merged geometries in Three.js

I want to create a Pine using 2 meshes, 1 for the trunk and another one for the bush, this what I've done: var pine_geometry = new THREE.Geometry(); var pine_texture_1 = THREE.ImageUtils.loadTexture('./res/textures/4.jpg'); var pine_geometry_1 =…
Edgar Alexander
  • 364
  • 4
  • 11
6
votes
3 answers

What is the correct way to merge/transform a dev branch into a stable branch in Mercurial?

I work for a web development company that uses Mercurial as its DVCS of choice. We're currently in the process of creating a new version of a site that is already in production. Both a stable and a development branch of the site exist in the same…
JK Laiho
  • 3,252
  • 5
  • 30
  • 36
6
votes
4 answers

Merging k sorted linked lists - analysis

I am thinking about different solutions for one problem. Assume we have K sorted linked lists and we are merging them into one. All these lists together have N elements. The well known solution is to use priority queue and pop / push first elements…
M. Williams
  • 4,805
  • 2
  • 24
  • 27
1 2 3
99
100