git --versionmkdir learn_gitcd learn_gitls -algit initls -algit config --global user.name "wuyong"git config --global user.email [email protected]git config --global --listgit statuspwdgit statusgit add learn_git.htmlgit statusgit commit -m "create learn_git.html"git statusgit add .git statusgit commit -m "web1.0"git add learn_git.htmlgit commit -m "web2.0"git logHTTPS
https://github.com/wuyong/learn_git.git
SSH
[email protected]: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 [email protected]:wuyong/learn_git.git
git push -u origin master…or push an existing repository from the command line
git remote add origin [email protected]:wuyong/learn_git.git
git push -u origin masterls -al ~/.sshssh-keygen -t rsa -b 4096 -C "[email protected]"eval "$(ssh-agent -s)"open ~/.ssh/configtouch ~/.ssh/configopen ~/.ssh/configHost *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsassh-add -K ~/.ssh/id_rsapbcopy < ~/.ssh/id_rsa.pubssh -T [email protected]git remote add origin [email protected]:wuyong/learn_git.git
git push -u origin mastergit add learn_git.htmlgit commit -m "web3.0"git push -u origin mastergit log