新项目关联远程git仓库

Command line instructions

1. Git global setup

git config --global user.name "username"
git config --global user.email "email"

2. Create a new repository

git clone git_url
cd test1
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

3. Existing folder

cd existing_folder
git init
git remote add origin git_url
git add .
git commit -m "Initial commit"
git push -u origin master

4. Existing Git repository

cd existing_repo
git remote add origin git_url
git push -u origin --all
git push -u origin --tags

推荐阅读更多精彩内容