Git diff parse using grep shell command

git diff

diff --git a/lids b/lids
index 009d7e8..46447a8 100644
--- a/lids
+++ b/lids
@@ -1,12 +1,12 @@
-FP CA1 CAPS Mapping.pdf
 mtool1428_100squaretool.html
+mtool1428_100squaretool.py
 Lesson Guide 100square 23LessonIdeas.pdf
 Worksheet 100square 0to99.pdf
 Worksheet 100square 1to100.pdf
 Worksheet 100square Blank.pdf
-Worksheet 100square Challenge 1.pdf
-Worksheet 100square Challenge 2.pdf
+Worksheet 100square Challenge 11.pdf
 Worksheet 100square Challenge 3.pdf
+Worksheet 100square Challenge 2.pdf
 Worksheet 100square Challenge 4.pdf
 Worksheet 100square Challenge 5.pdf
 Worksheet 100square Challenge 6.pdf

How to grep deleted strings starting with a single – sign and string starting with single + sign

  • Search for a branch name using wildcards
  • Installing git on shared hosting - ./configure: no such file or directory
  • How to pass a programmatically generated list of files to `git filter-branch`?
  • Bash command prompt with virtualenv and git branch
  • How to hard reset from one git branch to other in JGit?
  • In a bash script, git does not recognize it own directory?
  • How I can use ruby-git to recursively clone a remote repo?
  • Setting up DotBot & Antigen
  • Run git commands on remote?
  • Determine relationship between commits
  • Git Ignore File - Push with Blank File Not No File
  • Manually set 'forked from' to GitHub project
  • 2 Solutions collect form web for “Git diff parse using grep shell command”

    How to grep deleted strings starting with a single – sign and string starting with single + sign

    You can use this egrep:

    grep '^ *[-+][a-zA-Z0-9]'
    

    OR this:

    grep '^ *[-+][[:alnum:]]'
    

    OR this:

    grep '^ *[-+][^-+]' 
    

    The following command shows lines with ‘-‘ or ‘+’ from the beginning of each line that are not followed by ‘-‘ or ‘+’

    git diff <file> | grep ^[-+][^-+]
    
    Git Baby is a git and github fan, let's start git clone.