第一次在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
网友评论