git config

git config

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 Jan 10 8:23
Editor
Edited
Edited
2025 May 7 17:57
git config --global credential.helper store git config --global user.name "seonglae" git config --global user.email "sungle3737@gmail.com" git config --global init.defaultBranch main git config --global --replace-all core.pager "less -F -X"
WARNING: If you use credential.helper store from the answer, your password is going to be stored completely unencrypted ("as is") at ~/.git-credentials. Please consult the comments section below or the answers from the "Linked" section, especially if your employer has zero tolerance for security issues.
~/.gitconfig
 
 
git config --global --unset user.name git config --global --unset user.email git config --global --unset credential.helper
 
 

Windows File error

[core] autocrlf = false safecrlf = false eol = lf filemode = false

git config alias

If windows change open to start

[alias] # ******************** # My dumbass typos ammend = commit --amend amend = commit --amend # ********************* # Github # From - https://salferrarello.com/git-alias-open-pull-request-github/ pr = "!f() { \ open \"$(git ls-remote --get-url $(git config --get branch.$(git rev-parse --abbrev-ref HEAD).remote) \ | sed 's|git@github.com:\\(.*\\)$|https://github.com/\\1|' \ | sed 's|\\.git$||'; \ )/compare/$(\ git config --get branch.$(git rev-parse --abbrev-ref HEAD).merge | cut -d '/' -f 3- \ )?expand=1\"; \ }; f" hub = "!f() { \ open \"$(git ls-remote --get-url \ | sed 's|git@github.com:\\(.*\\)$|https://github.com/\\1|' \ | sed 's|\\.git$||'; \ )\"; \ }; f"
  • git pr -> Open this PR at github.com
  • git hub -> Open this repo at github.com
  • git amend -> Alias for git commit --amend
  • git ammend -> How I always misspell ‘amend’, also alias for git commit --amend
 
 
 
alias
 

Recommendations