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:14] – [git commands usage] 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>
 +
 +===== Commits related =====
 +==== amend last commit =====
 +
 +<code>
 +export EDITOR=vim
 +git commit --amend --author="Kamaraju S. Kusumanchi <kamaraju@gmail.com>"
 +git config user.email "kamaraju@gmail.com"
 +
 +git config --get-all --show-scope user.email
 +git config --get-all --show-origin user.email
 </code> </code>
  
git_notes.1680016473.txt.gz · Last modified: 2023/03/28 15:14 by raju