Questions tagged [merge]

Merging is the operation of taking two or more source contents to produce a single one. Things that are commonly merged are files (source code, configuration, etc.), branches in a version control system, redundant entries in databases, etc.

For example, merging two files that derives from the same original file in two different ways consists in taking the modifications made in both with respect to the original file to integrate them and produce a file where all the modifications from the diverging files appear. Sometimes, merging implies conflict resolution if the modifications are incompatible.

177 questions
39
votes
8 answers

How to exit a git merge asking for commit message?

I'm using git. I did a normal merge, but it keeps asking this: # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. And even if I write something, I can't exit…
Luca Reghellin
  • 659
  • 2
  • 7
  • 13
25
votes
8 answers

how to use patch and diff to merge two files and automatically resolve conflicts

I have read about diff and patch but I can't figure out how to apply what I need. I guess its pretty simple, so to show my problem take these two files: a.xml #AAABBB
Rafael T
  • 815
  • 3
  • 11
  • 16
23
votes
2 answers

How to merge two text files into one file without using cat or sed

I have two files File1: a b c File2: 1 2 3 now I need to combine them to one csv file a;1 b;2 c;3 As the files are really huge, I would rather not use cat and sed to process the second file. (For smaller files I can use a script). Any Idea ?…
Sebastian Heyn
  • 403
  • 5
  • 7
19
votes
2 answers

Merge pdf files and automatically create a table of contents with each file as an entry

I have several pdf files (chapter1.pdf, chapter2.pdf, etc.), each one being a chapter of a book. I now how to merge them into a single pdf (I use the command pdfunite from poppler), but since the output file is big, it's difficult to find a chapter…
Seninha
  • 1,035
  • 1
  • 9
  • 17
13
votes
5 answers

How can I merge pdf files so that each file begins on an odd page number?

I need to merge a few dozed pdfs, and i want all of the input pdfs to start on an odd page in the output pdf. Example: A.pdf has 3 pages, B.pdf has 4 pages. I don't want my output to have 7 pages. What I want is an 8-page pdf in which pages 1-3 are…
Jan Warchoł
  • 2,881
  • 3
  • 16
  • 28
13
votes
3 answers

How do I "merge" two text files?

I recently upgraded from Ubuntu 12.04 to 12.10 and at one point, it encountered an Apache config file conflict in apache2.conf. I didn't give me a merge option at that point, so I just rejected the new file and the installer saved the new file as…
Steven
  • 231
  • 1
  • 2
  • 5
13
votes
3 answers

Merging two files, one column at a time

I have 2 large files (3000 columns, 15000 rows) of the following format file1 (tab-separated): 1/0 0/0 0/0 0/0 1/1 0/0 1/1 0/1 0/0 file2 (tab-separated): 3 5 2 1 7 10 3 4 3 I'd like to combine the values from the first column of each file with a…
Jon Degner
  • 133
  • 4
12
votes
2 answers

Command-line diff tool

So we all have the diff command installed by default. I certainly don't know how to use it well. But I would expect some reasonable default usage. But when I type diff file1 file2 I get ... a text ... which I have to parse in my head ... which is…
Vorac
  • 2,957
  • 8
  • 36
  • 53
11
votes
2 answers

Merging two internet connections from two network interfaces in order to obtain double speed

I have two network interfaces (one wired & one wireless). I have two internet accounts too (each 256 kBps; one from a modem that I use as wired connection & the other from a wireless network). Is it possible to connect to both networks and merge…
Ariyan
  • 2,056
  • 3
  • 27
  • 36
10
votes
7 answers

How to merge text of alphabetic lines with the numeric lines in shell?

I Have a file that has text like this: AAAA BBBB CCCC DDDD 1234 5678 9012 3456 EEEE 7890 etc... And i want to match up the Alphabetic lines with the Numeric lines so they are like this: AAAA 1234 BBBB 5678 CCCC 9012 DDDD 3456 EEEE…
NWS
  • 683
  • 2
  • 7
  • 15
10
votes
2 answers

join multiple lines based on column1

I have a file like below.. abc, 12345 def, text and nos ghi, something else jkl, words and numbers abc, 56345 def, text and nos ghi, something else jkl, words and numbers abc, 15475 def, text and nos ghi, something else jkl,…
pvkbhat
  • 101
  • 1
  • 1
  • 3
9
votes
2 answers

Merge folders and replace files using CLI

I want to update some forum software and I'd like to test the upgrade process using CLI as a learning possibility. How do I merge contents of a folder into another folder and replace files?
user46165
  • 91
  • 1
  • 2
9
votes
3 answers

Join, filling in missing key values

I have two files having a primary key value as a first field, and a corresponding value(s) as the remaining fields, and some primary key values are missing in one of them but are present in another, and vice versa: $ cat jointest1.txt jointest2.txt …
mbaitoff
  • 4,911
  • 8
  • 28
  • 32
8
votes
3 answers

merge two files, first line from first file followed by first line from second file

I have two files : f1: f2: ============== =============== some text line 1 A1 some text line 2 A2 some text line 3 A3 can…
Forever Learner
  • 729
  • 1
  • 10
  • 17
7
votes
4 answers

How to merge pre-sorted files into a single BIG file, without excessive memory or temporary disk use

I'm trying to sort (and ideally remove duplicate lines) from a 1.4TB file. Splitting and sorting the individual chunks is not an issue, but reassembling them is turning out to be a challenge. I expected from the man page that 'sort -m' (Under…
rowan194
  • 131
  • 2
  • 6
1
2 3
11 12