转用github同步代码

来源:互联网 发布:昆明seo团队 编辑:程序博客网 时间:2024/05/27 09:45

新建一个github账户,然后在本地(Ubuntu)安装git,绑定ssh key,成功后,即可实现同步。


感谢git普及好文字,http://rogerdudler.github.io/git-guide/index.zh.html


在github上新建一个repository,然后在本地clone下来,git clone git@github.com:whzhcahzxh/sentimentAnalysis


将已经写好的文件拷入其中,或者自己写文件,cp -a /home/administrator/Python/sentimentAnalysis/ /home/administrator/git/repos/sentimentAnalysis/


将文件加入缓存git add .

提交git commit -m "从本地上传"

上传git push


下载是git pull


其中,如果要改remote origin: git remote add origin git@github.com:whzhcahzxh/sentimentAnalysis.git

删除以后remote origin: git remote rm origin



0 0
原创粉丝点击