How to compare a local Git branch with its remote branch

To update remote-tracking branches, you need to type git fetch first and then: You can git branch -a to list all branches (local and remote) and then choose the branch name from the list (just remove remotes/ from the remote branch name. Example: git diff main origin/main (where “main” is the local main branch and “origin/main” is a remote, namely the origin and … Read more

How to colorize diff on the command line

Man pages for diff suggest no solution for colorization from within itself. Please consider using colordiff. It’s a wrapper around diff that produces the same output as diff, except that it augments the output using colored syntax highlighting to increase readability: or just: Installation: Ubuntu/Debian: sudo apt-get install colordiff OS X: brew install colordiff or port install colordiff

How to colorize diff on the command line

Man pages for diff suggest no solution for colorization from within itself. Please consider using colordiff. It’s a wrapper around diff that produces the same output as diff, except that it augments the output using colored syntax highlighting to increase readability: or just: Installation: Ubuntu/Debian: sudo apt-get install colordiff OS X: brew install colordiff or port install colordiff

How to make and apply SVN patch?

By default, patch ignores the directory portion of the target filename; it’s just looking for “httpd.conf” in your current working directory. If you want it to use the full path, you have to explicitly ask it to do so with the -p option: patch -p 0 < httpd.patch The number after -p is how many levels to remove from the filename … Read more