git global setup
git config --global user.name "yourname" git config --global user.email "your@email.com"
Create a new repository
git clone git@yourrepoaddress.git cd theFileFoldYouCloned touch README.md git add README.md git commit -m"add README" git push -u origin master
Push an existing folder. ==> you need to have a blank project in remote
cd existing folder git init git remote add origin git@yourrepoaddress.git git add . git commit -m"Initial commit" git push -u origin master
Push an existing Git repository
cd existing_repo git remote rename origin old-origin git remote add origin git@yourrepoaddress.git git push -u origin --all git push -u origin --tags
Cancel the relate between local repo and remote repo
git remote remove origin
Other commands we commonly used
git fetch git pull origin git push origin git push --set-upstream origin 'branch' git merge --abort
标签:origin,git,remote,--,add,常用命令,push From: https://www.cnblogs.com/codecheng/p/17756558.html