python使用git进行版本控制2
对上一次的readme文件进行修改
现在,运行git status
命令看看结果
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: readme.txt
no changes added to commit (use "git add" and/or "git commit -a")
如果想查看文档可以使用:cat readme.txt
现在,我们根据GitHub的提示,在本地的learngit
仓库下运行命令:
$ git remote add origin git@github.com:chengqiangaoci/learngit.git
下一步,就可以把本地库的所有内容推送到远程库上:
$ git push -u origin master
从现在起,只要本地作了提交,就可以通过命令:
$ git push origin master