Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Working with Linux ??? Quick Hacks for the Command Line

You're reading from   Working with Linux ??? Quick Hacks for the Command Line Command line power like you've never seen

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787129184
Length 222 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
 I»ôfan I»ôfan
Author Profile Icon I»ôfan
I»ôfan
Bogdan Vaida Bogdan Vaida
Author Profile Icon Bogdan Vaida
Bogdan Vaida
Arrow right icon
View More author details
Toc

Merging Git conflicts with ease


Now let's look at another improvement that we can bring to git. Most tasks are easy to execute from the command line, but some tasks, such as merging, require a specialist's eye for understanding the different format.

Let's open the feature file from our previous chapter, edit it, add a new line, and save it:

git diff

The git diff command will show us colored text explaining the differences between the git file and the modified file, but some people find this format hard to understand:

Luckily, we can tell git to use external tools when it comes to merge and one external tool that we can use is called Meld. Let's install it using the following:

sudo apt install meld

After this, we can run the following command:

git difftool

It will ask us if we want to launch Meld as an external program for viewing the file. It's also giving us a list of tools that it can use for displaying the difference. Hit y to open Meld:

Now we can easily see the two files side by side and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images