Github 使用方法

来源:互联网 发布:人工智能会毁灭人类 编辑:程序博客网 时间:2024/05/22 20:15

一种方法是,在github创建一个repository,然后git clone到本地,再把本地的文件放到这个文件夹里,再git add, git commit, git push到github


还有一种方法,在github创建同名 repository,但是注意,不要包括readme文件。然后在本地文件夹内,打开terminal, git init这个文件夹,然后

vim README.md  (添加一个README文件)并在这个文件里写点东西比如this is readme file

然后 git add README.md (或者 git add .)

git commit -m "readme for this project"

git remote add origin https://github.com/xxxx.xxxx.git  (在这行之前,可以先git remote rm origin,通常会返回 Could not remove 

config section 'remote.origin')

)git push -u origin master (需要输入github的用户名和密码)

参考

http://www.cnblogs.com/super-d2/p/3341864.html





0 0
原创粉丝点击