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
5 answers

How i can merge two binary trees

I have two binary trees and I want to merge them. My first question is that whether we can merge two binary trees and if yes how efficiently I can perform the merge operations and what are the various ways i can perform the merging operations. ..?
saurabh ranu
  • 1,351
  • 6
  • 18
  • 24
7
votes
3 answers

Persisting an object in Hibernate while having a known primary key.

My problem is with detached objects... I am currently using Spring with Hibernate. I have a mapped object that has a primary key as a String (I know it sucks... but refactoring the code would take months), and I wish to persist it. (I have…
flavio_yama
  • 313
  • 1
  • 4
  • 10
7
votes
3 answers

How to merge code and resolve conflicts more easily using git?

There is a great option --patch which can be used with git add. Using this option I can easily review all my changes and decide which chunks should be added to staging area. This interactive process can be made through all modified files. I am…
noisy
  • 6,495
  • 10
  • 50
  • 92
7
votes
1 answer

Performing a merge in Pandas on a column containing a Python `range` or list-like

My question is an extension of this one made a few years ago. I'm attempting a left join but one of the columns I want to join on needs to be a range value. It needs to be a range because expanding it would mean millions of new (and unnecessary)…
dlindsay
  • 105
  • 7
7
votes
2 answers

Git - Merge branch from a different repository

I hope this does not seem to obvious. I have two git repository. We decided to split one branch from the first repoistry into a git sub module. Now I have been using this sub module, however people have been pushing commits to the first repository…
binarycreations
  • 3,091
  • 6
  • 32
  • 38
7
votes
5 answers

Join common keys in hash one-liner

I have this array of pairs: [{"a"=>"1"}, {"b"=>"2"}, {"a"=>"3"}, {"b"=>"4"}, {"a"=>"5"}] I would like a method to merge the keys in common with multiple values to: [{"a"=>["1","3","5"]}, {"b"=>["2","4"]}]
Ben Orozco
  • 4,361
  • 4
  • 33
  • 49
7
votes
1 answer

Any way to automatically merge approved nonconflicting Gitorious merge request?

We are using Gitorious, installed on a local server to host our shared git repositories. When a developer sends a merge request from his public clone to main repository, the owner/integrator/architect has to pull the request into his local git…
flurdy
  • 3,782
  • 29
  • 31
7
votes
1 answer

Python with DataFrame merge of aggregations ...error: '' is both an index level and a column label, which is ambiguous

import pandas as pd data1 = [ {'File': '7396ee8aea09.json', 'Last': '2019-04-25 20:24:28+00:00', 'Size': 78796, 'COLA': 'STANDARD'}, {'File': '7777682e4/ip/done', 'Last': '2019-04-24 21:45:01+00:00', 'Size': 4, 'COLA': 'CUSTOM'}, {'File':…
Andre Couture
  • 97
  • 1
  • 1
  • 8
7
votes
2 answers

How to Merge Two PDF Files Using jsPDF

I'd like to know how to merge two (or more) PDF files into one single file using jsPDF and then show it using the browser's pdf viewer of the user. My requirement is to make easier the process of printing a group of documents, instead of printing…
Emmanuel_M
  • 73
  • 1
  • 1
  • 4
7
votes
1 answer

Why segment merge in Elasticsearch requires stopping the writes to index

I am looking to run the optimize(ES 1.X) which is now known as forcemerge API in ES latest version. After reading some articles like this and this. it seems we should run it only on read-only indices, quoting the official ES docs: Force merge…
user12056260
7
votes
3 answers

How to merge/join empty dataframe with another filled dataframe by equal indices and column names?

I want to combine two dataframes. One dataframe, let's say Empty_DF, is empty and has big size (320 columns by 240 rows) with indexes and column names just integers. The other one,ROI_DF, is smaller and filled and matches at a certain location the…
FABeng
  • 83
  • 1
  • 2
  • 5
7
votes
4 answers

How to tell if git branch has been fully merged after squash

When merging branches with --squash, git does no longer seem to be able to determine whether a branch has been fully merged. How can I quickly check this with existing git commands? To reproduce, create a new git repository: $ mkdir tmp $ cd tmp $…
digory doo
  • 1,978
  • 2
  • 23
  • 37
7
votes
3 answers

Deduplicate rows in a BigQuery partition

I have a table with many duplicated rows - but I only want to deduplicate rows one partition at a time. How can I do this? As an example, you can start with a table partitioned by date and filled with random integers from 1 to 5: CREATE OR REPLACE…
Felipe Hoffa
  • 54,922
  • 16
  • 151
  • 325
7
votes
1 answer

why is git rebase flagging conflicts on new branch specific files

I have a maddening little git rebase issue going on right now. The brief summary is that there are conflicts on files where there should not possibly be conflicts. I have read many questions on SO and many articles but nothing I have found seems to…
btonner
  • 71
  • 3
7
votes
4 answers

Does Git keep a record of past merge conflicts?

I'd like to look at the repository history and see what types of merge conflicts have occurred in the past. I've tried using git log --merges but that just seems to show successful merges.
Stu
  • 324
  • 3
  • 10