User Tools

Site Tools


git_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
git_notes [2023/03/28 15:18] – [amend last commits] rajugit_notes [2023/05/05 14:55] (current) – [dokuwiki table syntax] admin
Line 74: Line 74:
 <code> <code>
 git grep -i --all-match -e '\^.*\^' -e '|.*|' git grep -i --all-match -e '\^.*\^' -e '|.*|'
 +</code>
 +
 +==== Count number of lines in a file but exclude blank lines ====
 +<code>
 +git grep -e "^" --and --not -e "^$" <file_name>  | wc -l
 +</code>
 +
 +For example:
 +<code>
 +$ git grep -e "^" --and --not -e "^$" dummy_1510.txt  | wc -l
 +27
 </code> </code>
  
 ===== Commits related ===== ===== Commits related =====
-==== amend last commits ===== +==== amend last commit ===== 
-useful commands+
 <code> <code>
 export EDITOR=vim export EDITOR=vim
git_notes.1680016694.txt.gz · Last modified: 2023/03/28 15:18 by raju