Git: fast diff viewing before commit

Before I commit I run git status and get output like this:

#   modified:   TemplateDemo/src/com/example/templatedemo/Item.java
#   modified:   TemplateLib/res/layout/layout_list.xml
#   modified:   TemplateLib/res/layout/list_header.xml
#   modified:   TemplateLib/res/values/strings.xml
#   modified:   TemplateLib/src/com/saturn/templatelibrary/ISwappableAdapter.java
#   modified:   TemplateLib/src/com/saturn/templatelibrary/ItemAnimator.java
#   modified:   TemplateLib/src/com/saturn/templatelibrary/SwappableAdapter.java
#   modified:   TemplateLib/src/com/saturn/templatelibrary/TemplateListActivity.java
#   modified:   TemplateLib/src/com/saturn/templatelibrary/TemplateListFragment.java

Now I want to view diff for each file. Now I do it like this: I manually select each filename from the command this output and run meld <filename> for each file in the list. Is there a faster way?

  • git diff to ignore patterns in files
  • How do I prettily print out a git-diff output?
  • How to download a single commit-diff from GitHub?
  • Ignore *all* whitespace changes with git-diff between commits
  • See exact divergence/commits between local and remote Git repo
  • Syntax Highlighting Combine diff and xxx
  • How to change the “both added” and “both modified” colors during a Git merge in Git Bash
  • How to execute git log on windows cmd?
  • Can one configure Android Studio to run a gradle task before submitting a Git commit?
  • git-svn clone or svn2git unexpectedly stopping
  • Travis CI - android build failed. No connected devices error
  • How to obtain the details of a gerrit change which is directly submitted / merged on the server
  • 4 Solutions collect form web for “Git: fast diff viewing before commit”

    Just running git diff should do exactly what you want.

    If you want a more graphical view use git difftool.

    There are many third party programs that make Git much simpler to use, and also show you diffs of each file before you stage them, and even allow you to stage chucks at a time.

    SourceTree is my GoTo program for Git.

    Git gui is my weapon of choice for this. You can easily scan through each file and see what’s removed, and what is added.

    I manually select each filename... Is there a faster way?
    

    Yes. If you prefer meld for viewing diffs you can run meld . from the same directory where you run git status. Then you can select any filename in meld GUI to view diff or view diffs for all files at once with every diff in separate tab.

    Git Baby is a git and github fan, let's start git clone.