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/01 22:26] – [Updating feature branch with the latest development branch] rajugit_notes [2023/05/05 14:55] (current) – [dokuwiki table syntax] admin
Line 75: Line 75:
 git grep -i --all-match -e '\^.*\^' -e '|.*|' git grep -i --all-match -e '\^.*\^' -e '|.*|'
 </code> </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>
 +
 +===== Configuration related =====
 +==== configuration files ====
 +  * https://git-scm.com/docs/git-config#FILES - talks about which files 'git config' reads from. High information density. Easy to understand.
  
 ===== git commands usage ===== ===== git commands usage =====
git_notes.1677709604.txt.gz · Last modified: 2023/03/01 22:26 by raju