git --version
mkdir learn_git
cd learn_gitls -al
git init
ls -al
git config --global user.name "wuyong"git config --global user.email wuyong@fastmail.com
git config --global --list
git status
pwdgit status
git add learn_git.html
git status
git commit -m "create learn_git.html"git status
git add .git status
git commit -m "web1.0"git add learn_git.html
git commit -m "web2.0"git log
HTTPS
https://github.com/wuyong/learn_git.git
SSH
git@github.com:wuyong/learn_git.git
...or create a new repository on the command line
echo "# learn_git" >> README.md git init git add README.md git commit -m "first commit" git remote add origin git@github.com:wuyong/learn_git.git git push -u origin master
...or push an existing repository from the command line
git remote add origin git@github.com:wuyong/learn_git.git git push -u origin master
ls -al ~/.sshssh-keygen -t rsa -b 4096 -C "wuyong@fastmail.com"eval "$(ssh-agent -s)"
open ~/.ssh/configtouch ~/.ssh/configopen ~/.ssh/configHost * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_rsa
ssh-add -K ~/.ssh/id_rsapbcopy < ~/.ssh/id_rsa.pub
ssh -T git@github.com
git remote add origin git@github.com:wuyong/learn_git.git git push -u origin master
git add learn_git.html
git commit -m "web3.0"git push -u origin master
git log