使用命令行将提交代码到github

2016-06-14  本文已影响54人  ArleyDu

第一次在github创建仓库后使用下列命令来将本地代码保存到github:

…or create a new repository on the command line

echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/pobeizhang/test.git
git push -u origin master

以后修改代码再次保存到上面那个仓库时,使用
git add .

git commit -m "此次提交的注释信息"

git push

上一篇 下一篇

猜你喜欢

热点阅读