Ignoring special files
Create a . Gitignore file in the workspace, write content
# Windows: Thumbs.dbehthumbs.dbDesktop.ini # python: Ignores .pyc .pyo dist files or directories generated by Python compilation *. py[cod]*.so *. Egg*.egg- Infodistbuild # My Configurations: Db.inideploy_key_rsa
Then add and commit the file
Git status no longer displays utracked files when the workspace appears in the. gitignore file.
Configure aliases
git config--global alias.st status
git config--global alias.unstage "Reset HEAD" to undo staging area's changes
git config--global alias.last "log-1" last Commit
git config --global alias.lg "log --color --graph --pretty=format:‘%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset‘ --abbrev-commit"
View aliases
git config--list | grep alias
Or
git config--get-regexp alias
Cancel Alias
git config--global--unset alias.st
Configuration file
. git/config 配置Git的时候,加上--global是针对当前用户起作用的。
[alias] last = log -1
. gitconfig If not added, it only works for the current warehouse.
git learning-Customizing git