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
8
votes
3 answers

RESTful merge and split of resource

I have a REST service that serves Invoice functionality, for example I can create, update and delete an invoice via the REST service. However I now need to have functionality to split an invoice into several new invoices, i.e. the method needs to…
Fresa
  • 1,411
  • 2
  • 10
  • 8
8
votes
2 answers

Python class to merge sorted files, how can this be improved?

Background: I'm cleaning large (cannot be held in memory) tab-delimited files. As I clean the input file, I build up a list in memory; when it gets to 1,000,000 entries (about 1GB in memory) I sort it (using the default key below) and write the…
tgray
  • 8,826
  • 5
  • 36
  • 41
7
votes
2 answers

Merging from branch to trunk with 'Merge range of revisions'

I have merged in Subversion/TortoiseSVN like this a few times: Method A: 1) I change the trunk and commit. 2) I make other changes in a branch and commit. 3) In a working copy from trunk: I merge from the branch using TortoiseSVN's 'Merge a range…
Ole Lynge
  • 4,457
  • 8
  • 43
  • 57
7
votes
1 answer

Git merge single file without rebasing

I have three branches (let's call them master, testing, and feature). All three are shared, so I cannot rebase any of them without causing problems for others. Currently, all three branches have diverged (none is a fast-forward), so eventually some…
chimeracoder
  • 20,648
  • 21
  • 60
  • 60
7
votes
2 answers

why extend a python list

Why use extend when you can just use the += operator? Which method is best? Also what's the best way of joining multiple lists into one list #my prefered way _list=[1,2,3] _list+=[4,5,6] print _list #[1, 2, 3, 4, 5, 6] #why use…
Rusty Rob
  • 16,489
  • 8
  • 100
  • 116
7
votes
1 answer

TFS 2010 Merge after renaming a root branch

My source code branch contains almost 20000 files. I created a branch a couple of months ago called, "v2.5TEMP", which was branched off the "Main" trunk. Developers were working in both branches. I then renamed "v2.5TEMP" to simply "v2.5." People…
Jag Padda
  • 111
  • 4
7
votes
2 answers

Merge memorystreams to one iText document

I have four MemoryStreams of data that I want to merge and then open the pdfDocument, without creating a single file. It's possible to write them down to files and then merge them but that would be bad practice and that can also cause a few issues…
Johan
  • 753
  • 2
  • 11
  • 31
7
votes
3 answers

Git: Is there a quick way to see when was the last time that git merge master was done on the current working branch?

I'm usually working on a branch that is diverged from master. So while I'm developing things, I perform git merge master once in a while. And sometimes I wanna know when was the last time, I did git merge master on that branch. I know I can do…
beatak
  • 9,185
  • 10
  • 33
  • 42
7
votes
2 answers

Reusing a merged development branch / Remerging into an unchanged stable branch with git

Two programmers, A & B, are working on a project with a github hosted repo: Branch master exists. Programmer A creates devBranchA based on the latest master master$ git checkout -b devBranchA Programmer B creates devBranchB based on the latest…
7
votes
4 answers

Merging a list of lists

How do I merge a list of lists? [['A', 'B', 'C'], ['D', 'E', 'F'], ['G', 'H', 'I']] into ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'] Even better if I can add a value on the beginning and end of each item before merging the lists, like html…
Steven Matthews
  • 9,705
  • 45
  • 126
  • 232
7
votes
4 answers

Python: merge nested lists

beginner to python here. I have 2 nested lists that I want to merge: list1 = ['a', (b, c), (d, e), (f, g, h) ] list2 = [(p,q), (r, s), (t), (u, v, w) ] the output I am looking for is: list3 =…
Rishav Sharan
  • 2,763
  • 8
  • 39
  • 55
7
votes
5 answers

Merge two tables if the values of a key column are contained in the other key column

I have a dataframe df1 including a set of transactions: set.seed(99) df1 <- tibble::tibble( ID = 1:10, Items = replicate(10, paste0('item-', sample(1:10, sample(3:5)[1]), collapse = ', ')) ) # # A tibble: 10 × 2 # ID Items …
user18894435
  • 373
  • 1
  • 10
7
votes
3 answers

How to efficiently merge two datasets?

I am trying to merge two fairly large - but not ridiculously so (360,000 X 4, 57,000 X 4) - datasets by one common ID. I have tried a regular merge(), merge.data.table(), and sqldf(). Every time I keep running out of memory (cannot allocate vector…
user702432
  • 11,898
  • 21
  • 55
  • 70
7
votes
3 answers

Merge two dataframes based on similar time interval in R

I have two data frames like the dummy samples , df1 (main data set) and df2. These data originally coming from two different log data. df1 is always complete dataset from 02:00 midnight until 02:00 next day with different stream values during this…
DanG
  • 689
  • 1
  • 16
  • 39
7
votes
1 answer

Merge and sort multiple XML Files with XSL

The problem is to merge and sort multiple XML files with XSL and output valid HTML, viewable with Firefox >=3.5 and if possible IE >=7. The answer should be as simple as possible (performance is not important). File a.xml
gaddomn
  • 125
  • 2
  • 4