[alias] st = status co = checkout br = branch ci = commit lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
CONFIGURING GIT
Set the name that will be associated with your commits
1
git config --global user.name "[name]"
Set the email that will be associated with your commits
1
git config -global user.email "[email]"
Create a shortcut for a Git command (e.g. alias.glog “log —graph —oneline”)
1
git config -global alias.[alias] [command]
Set the default text editor to use for commit messages (e.g. vi)
1
git config -global core.editor [editor]
Open the global config file in a text editor for manual editing
1
git config -global —edit
INITIALIZING AND CLONING
Initialize an empty Git repository in the current directory
1
git init
Create an empty Git repo in the specified directory
1
git init [directory]
Clone a remote Git repository from the url into a local directory
1
git clone [url]
Clone a remote repo into the specified local directory
sudo mysql -uroot -p -e “ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH caching_sha2_password BY ‘’;” -e “UPDATE mysql.user SET Host=‘%’ WHERE User=‘root’ AND Host=‘localhost’;” -e “FLUSH PRIVILEGES;”
Jan 03 19:25:38 iZwz9bi9yxqor74jqvhsr1Z systemd[1]: Starting nginx - high performance web server... Jan 03 19:25:38 iZwz9bi9yxqor74jqvhsr1Z systemd[1]: Started nginx - high performance web server.
The authenticity of host 'github.com (192.30.253.112)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts. PTY allocation request failed on channel 0 Hi longluo! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed.