Git Command
# Git Argument
-Crun in specific directorygit -C ~/.SpaceVim pull-filter- The form –filter=blob:none omits all blobs.
# push
# diff
Compare with previous commit: use
^!git diff 77e13ax^!
Compare specific directory
git diff hash1 hash2 - path/to
See the number of changes
git diff āstat hash1 hash2
See what in staged area
git diff āstaged
hash-objectĀ converts an existing file into a git objectcat-fileĀ prints an existing git object to the standard output.
# config
To get all config value, use --list
git config --list
or look at yourĀ~/.gitconfigĀ file. The local configuration will be in your repository’sĀ.git/configĀ file.git config --list --show-originGenerating a new SSH key and adding it to the ssh-agent - GitHub Docs
git config --global gpg.format ssh
pbcopy < ~/.ssh/id_ed25519.pub
git config --global user.signingkey 'key'
git config --global commit.gpgsign true
git config --global tag.gpgsign true
git config --global color.ui auto
To get particular config value, use --get
git config --get --global color.ui
Creating a personal access token - GitHub Docs
git config --global credential.helper storegit config --global init.defaultBranch main