016--Git使用
2018-04-23 本文已影响3人
糖纸疯了
GIT教学
1.创建一个新项目并提交:or create a new repository on the command line
echo "# Vincent-RPC" >> README.md
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/enzoism/Vincent-RPC.git
git push -u origin master
2.项目已经存在直接提交:or push an existing repository from the command line
git remote add origin https://github.com/enzoism/Vincent-RPC.git
git push -u origin master
3.总结:在Git上面创建项目,按照顺序执行以下操作
两种方式(1):
* $ cd /Users/ld/Desktop/WalkerMan
* $ git init
* $ git add .
* $ git commit -m "first commit"
* $ git remote add origin [https://git.coding.net/TonyDowneyJr/WalkerMan.git](https://git.coding.net/TonyDowneyJr/WalkerMan.git)
* $ git push -u origin master
两种方式(2):
* $ cd /Users/ld/Desktop/WalkerMan
* $ git init
* $ 在终端上面进行commit就可以了(等于省略了两步)
* $ git remote add origin [https://git.coding.net/TonyDowneyJr/WalkerMan.git](https://git.coding.net/TonyDowneyJr/WalkerMan.git)
* $ git push -u origin master