用git客户端上传项目: 客户端下载
If you already have Git installed, you can get the latest development version via Git itself:
git clone https://github.com/git/git
官网详细步骤:https://help.github.com/articles/generating-an-ssh-key/
删除一个repository:https://help.github.com/articles/deleting-a-repository/
error: src refspec master does not match any.
错误原因,目录中没有文件,空目录不能提交
error: failed to push some refs to 'git@github.com:xxx/xxxx.git'
错误原因:github中的README.md文件不在本地代码目录中
可以通过如下命令进行代码合并:git pull --rebase origin master
提交代码:
1 git init //把这个目录变成Git可以管理的仓库
2 git add . //不但可以跟单一文件,还可以跟通配符,更可以跟目录。一个点就把当前目录下所有未追踪的文件全部add了
3 git commit -m "first commit" //把文件提交到仓库缓存区
4 git remote add origin git@github.com:wangjiax9/practice.git //关联远程仓库
5 git push -u origin master //把本地库的所有内容推送到远程库上
更新github代码:
1 git add *
2 git commit -m "更新说明"
3 git push origin master