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

How can I find out how many commits in master are not in my branch?

We are using GitHub to store our code repositories, and we would like all developers to ensure that branches are up to date with master before doing local developer testing, and merging. There are two ways of updating a branch with the commits of…
Steve
  • 2,764
  • 4
  • 27
  • 32
7
votes
6 answers

Merge all javascript files to one file

it's possible auto merge all javascripts on html page merge to one large javascript? (same for css) for example:
Fanda36
  • 307
  • 1
  • 4
  • 10
7
votes
2 answers

Merge two data frames with all combinations

I got a complicated problem: I have two data frames which have one combination of no and specification (Color, Part) each for 4 different machines. There is a total count of 5 specifications per machine (in reality even more machines and…
Juppes
  • 169
  • 9
7
votes
2 answers

How to rebase commits from another repository with a different history?

We have two Git repositories. Repo 1. Commits: A, B, C. This repository was created from SVN history. Repo 2. Commits: D, E, F. This repository was created without SVN history, just by using the working copy (as of commit C) which became the commit…
Igor Mukhin
  • 15,014
  • 18
  • 52
  • 61
7
votes
2 answers

Merge Pdf Files Using PDFBox

I have to merge two pdf Files using PdfBox of Apache. I have taken physical pdf files to do so. Below is the code: PDFMergerUtility ut = new…
Raushan
  • 214
  • 2
  • 3
  • 10
7
votes
1 answer

Cascading merges in Bitbucket Cloud

My company has Bitbucket Cloud (not Bitbucket Server) and we want to start using branching exclusively for development. One of the things I was looking forward to was automatic merging…
Viktor
  • 679
  • 6
  • 21
7
votes
2 answers

How to make --squash default on a merge?

We use separate branches for non-trivial bug fixes and features. The branchhes are kept in-sync with master by performing frequent git checkout ; git merge master. I noticed when merging, git pollutes the log files with multiple, non-relevant…
jww
  • 97,681
  • 90
  • 411
  • 885
7
votes
2 answers

In TFS, how can I cherry-pick a changeset to an unrelated branch?

I have a very messy TFS structure that I am trying to clean up (thanks to my predecessor). I now have a situation where I need to bring changesets selectively from one branch to another where they don't have a parent/child relationship and I don't…
idieeasy
  • 135
  • 2
  • 7
7
votes
1 answer

Merge SQLite files into one db file, and 'begin/commit' question

This post refers to this page for merging SQLite databases. The sequence is as follows. Let's say I want to merge a.db and b.db. In command line I do the following. sqlite3 a.db attach 'b.db' as toM; begin; <-- insert into benchmark select * from…
prosseek
  • 182,215
  • 215
  • 566
  • 871
7
votes
1 answer

Git Merge vs Rebase - Resolving conflicts

This is a bit long, but I think it may be an interesting problem. We just recently started to use git in our company despite a lot of people reluctance a few managed to start using it in small projects and now we're actually using it more relevant…
prototyp3PT
  • 123
  • 1
  • 1
  • 7
7
votes
1 answer

Is there a way to merge a JPA Entity based on unique key instead of primary key (in Hibernate)?

In Hibernate 5.1.0 / JPA 2.1, is there any way to merge based on a unique key instead of based on a primary key? I have the values for a unique key as input from an external system, but the input obviously does not contain my internal primary…
XDR
  • 4,070
  • 3
  • 30
  • 54
7
votes
1 answer

Git: definition of upward/downward directions between branches feels counterintuitive

I am reading the gitworkflows documentation at https://git-scm.com/docs/gitworkflows (can be also read in "man gitworkflows"), but the definition of the upward/downward directions between branches feels counterintuitive to me. I failed to make…
dashmile
  • 71
  • 5
7
votes
4 answers

Merge two data frames to get alternate rows of each data frame in sequence

My data.frame DATA is k l g 1 A 2004 12 2 B 2004 3.4 3 C 2004 4.5 Another data.frame DATA2 is i d t 1 A 2012 22 2 B 2012 4.8 3 C 2012 5.6 I want to get 1 A 2004 12 1 A 2012 22 2 B 2004 3.4 2 B 2012 4.8 3 C 2004 4.5 3 C 2012…
A.M.G16
  • 81
  • 1
  • 4
7
votes
1 answer

Does Git support automatic merge conflict resolution for append-only files?

In our project, we store localized strings in an XML file that is loaded by the application. These files are managed by a localization management tool, we don't edit the files directly. Now whenever two developers add new localized strings on…
theDmi
  • 17,546
  • 6
  • 71
  • 138
7
votes
2 answers

git checkout: detailed meaning of "theirs" and "ours"

The git checkout documentation says: --ours --theirs When checking out paths from the index, check out stage #2 (ours) or #3 (theirs) for unmerged paths. What's the meaning of "stage #2" and "stage #3" during merge, rebase and cherry-pick? Is…
fernacolo
  • 7,012
  • 5
  • 40
  • 61