How To Diff Two Files In Vim

Author: , February 5th, 2024

shell> vimdiff file1 file2 ~OR~ shell> vim file1 file2 Create a vertical split window: Control-w v Enable visual diff on the left side: :diffthis Move the cursor to the right side buffer: Control-w Right-arrow Enable visual diff on the left side: :diffthis You should now see the differences highlighted on both sides.

How To Get a List of Changed Files in git

Author: , December 19th, 2016

To get just a list of files changed since the last commit: git diff –name-only To create a global alias called ‘git changed’: git config –global alias.changed ‘diff –name-only’

How To Compare Two Lists Using grep

Author: , August 1st, 2016

Output all lines in list.txt which don’t match any line in excluded.txt: grep -Fxv -f excluded.txt list.txt

How To Create and Apply a Patch File Using the diff and patch Commands

Author: , January 25th, 2016

Create the patch by using the diff -u command:

To use the patch file, apply it to the original. The patch command will create a backup with the extension .orig, and the original file will be updated:

You may need to add the flag –ignore-whitespace to the patch command.

How To Diff Two Files With SSH/SCP Using VimDiff

Author: , February 3rd, 2015

vimdiff /path/to/file.css scp://yourHost.com//path/to/file.css

How To Compare Two Branches in GIT

Author: , December 10th, 2012

git diff branch1..branch2

How To See The GIT History Of A File

Author: , January 30th, 2012

git log -p filename ~or~ git whatchanged -p filename

How To Calculate The Number Of Days Between Dates In PHP

Author: , November 9th, 2011

http://www.php.net/manual/en/datetime.diff.php

How to diff remote files interactively with vim and ssh

Author: , November 7th, 2009

vimdiff /path/to/file scp://remotehost//path/to/file