git_notes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
git_notes [2022/02/06 01:24] – [stackoverflow answers I came across] raju | git_notes [2023/05/05 14:55] (current) – [dokuwiki table syntax] admin | ||
---|---|---|---|
Line 34: | Line 34: | ||
Note:- The "git merge development" | Note:- The "git merge development" | ||
+ | |||
+ | ===== Tasks ===== | ||
+ | ==== Initializing git for version control ==== | ||
+ | < | ||
+ | git config --global user.name " | ||
+ | git config --global user.email " | ||
+ | git config --global push.default matching | ||
+ | git config --global alias.co checkout | ||
+ | git init | ||
+ | </ | ||
+ | |||
+ | Ref:- https:// | ||
===== dummy ===== | ===== dummy ===== | ||
- | ==== learn git ==== | + | ==== git resources |
- | * https:// | + | * https:// |
==== stackoverflow answers I came across ==== | ==== stackoverflow answers I came across ==== | ||
Line 63: | Line 75: | ||
git grep -i --all-match -e ' | git grep -i --all-match -e ' | ||
</ | </ | ||
+ | |||
+ | ==== Count number of lines in a file but exclude blank lines ==== | ||
+ | < | ||
+ | git grep -e " | ||
+ | </ | ||
+ | |||
+ | For example: | ||
+ | < | ||
+ | $ git grep -e " | ||
+ | 27 | ||
+ | </ | ||
+ | |||
+ | ===== Commits related ===== | ||
+ | ==== amend last commit ===== | ||
+ | |||
+ | < | ||
+ | export EDITOR=vim | ||
+ | git commit --amend --author=" | ||
+ | git config user.email " | ||
+ | |||
+ | git config --get-all --show-scope user.email | ||
+ | git config --get-all --show-origin user.email | ||
+ | </ | ||
+ | |||
+ | ===== Configuration related ===== | ||
+ | ==== configuration files ==== | ||
+ | * https:// | ||
===== git commands usage ===== | ===== git commands usage ===== |
git_notes.1644110691.txt.gz · Last modified: 2022/02/06 01:24 by raju