• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

diff

Git Diff Head

September 3, 2019 by Ulysses

Here’s how to check what’s changed in your local Git repo vs the master repo.

Git Status tells you what file has changed, but not to the level of detail such as what lines or what code was changed.

git diff HEAD

git diff HEAD

Filed Under: Git Tagged With: compare, diff, git, head

Diff Between Two Directories

September 2, 2019 by Ulysses

Here’s how to get the differences between two directories using diff.

  • -q display only files when they differ
  • -r recursive to all sub-directories
diff -qr /directory-1 /directory-2

diff -qr /directory-1 /directory-2

Filed Under: Linux Tagged With: diff, directories, recursive

Git Diff

August 2, 2018 by Ulysses

When working with version control, sometimes you would like to know what files were committed locally vs what’s on the master origin repository. One way to know the difference is to use the git diff or the git log commands. Here are the commands to check the differences between the local and master origin repositories. Diff is better in my opinion since it actually displays the code changes instead of just displaying the commit ID.

$ git diff origin/master..HEAD
$ git log origin/master..HEAD

$ git diff origin/master..HEAD $ git log origin/master..HEAD

Filed Under: Cloud, Linux Tagged With: diff, git

Subversion Diff

November 6, 2012 by Ulysses

Subversion Diff will display differences between a file in the local working directory versus the same file that’s located in the repository. It will display on the screen what has been edited, modified or deleted. You invoke the Diff command from the Terminal as displayed below.

svn diff

svn diff

Filed Under: SVN Tagged With: diff

  • Home
  • About
  • Archives

Copyright © 2012–2022