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
Last revisionBoth sides next revision
git_notes [2022/02/06 01:24] – [stackoverflow answers I came across] rajugit_notes [2023/03/28 15:18] – [amend last commits] raju
Line 34: Line 34:
  
 Note:- The "git merge development" command works even if you have local changes not committed to feature1. Note:- The "git merge development" command works even if you have local changes not committed to feature1.
 +
 +===== Tasks =====
 +==== Initializing git for version control ====
 +<code>
 +git config --global user.name "Kamaraju S. Kusumanchi"
 +git config --global user.email "kamaraju@gmail.com"
 +git config --global push.default matching
 +git config --global alias.co checkout
 +git init
 +</code>
 +
 +Ref:- https://codemy.com/git
  
 ===== dummy ===== ===== dummy =====
-==== learn git ==== +==== git resources ==== 
-  * https://learngitbranching.js.org/+  * https://learngitbranching.js.org/ - Very good resource to learn git branching.
  
 ==== stackoverflow answers I came across ==== ==== stackoverflow answers I came across ====
Line 63: Line 75:
 git grep -i --all-match -e '\^.*\^' -e '|.*|' git grep -i --all-match -e '\^.*\^' -e '|.*|'
 </code> </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.txt · Last modified: 2023/05/05 14:55 by admin