Github 创建账户之后(可选择在本地建立一个github上传的文档,方便管理,也可以不建立)。然后使用terminal进入要上传的文件夹,仅需输入如下几步就可以保存在自己的github账户里啦:
- 告诉git你要添加这个你定位的文件夹或文件
$ git add .
- 我告诉git发生了什么
$ git commit -m add "say something"
- 确定执行就push
$ git push origin (此处为branch的名字,我没有试过remote小组共同编辑,所以都是master )
详细了解remote
我曾遇到过的问题:
error: failed to push
解决方案:
$ git fetch origin
$ git merge origin branch
Git 知识还是太少了,多上传些资料吧