美文网首页
Init Empty Repository

Init Empty Repository

作者: wyonxue | 来源:发表于2017-07-27 19:49 被阅读0次

Init Empty Repository

You have an empty repository.

To get started you will need to run these commands in your terminal.

New to Git? Learn the basic Git commands

Configure Git for the first time

git config --global user.name "yourname"
git config --global user.email "youremail@email"

Working with your repository

I just want to clone this repository

If you want to simply clone this empty repository then run this command in your terminal.

git clone http://xxxx/xxxx/xx.git

My code is ready to be pushed

If you already have code ready to be pushed to this repository then run this in your terminal.

cd existing-project
git init
git add --all
git commit -m "Initial Commit"

git remote add origin http://xxx/xxx/xx.git

git push origin master

My code is already tracked by Git

If your code is already tracked by Git then set this repository as your "origin" to push to.

cd existing-project

git remote set-url origin http://xxx/xxx/xx.git

git push origin master

相关文章

网友评论

      本文标题:Init Empty Repository

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