美文网首页
新项目关联远程git仓库

新项目关联远程git仓库

作者: 大道至简_Andy | 来源:发表于2017-12-04 19:37 被阅读36次

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

相关文章

网友评论

      本文标题:新项目关联远程git仓库

      本文链接:https://www.haomeiwen.com/subject/uvqfixtx.html