GitHub使用

git工具下载地址

   
   
   
   
1 https://code.google.com/p/msysgit/ 2 https://code.google.com/p/tortoisegit/

git配置命令

   
   
   
   
1 git config -- global user.name " name " 2 git config -- global user.email " [email protected] " 3 git config -- global push. default simple 4 git config -- list

git远程库操作命令

   
   
   
   
1 // 为本地库创建一个远程库,以--bare为参数,本地库 远程库 2 git clone -- bare . .. / remote - repository.git 3 4 // clone远程库代码,在当前目录拉去全程库的文件,远程库 本地目录 5 git clone .. / remote - repository.git . 6 // 本地库中创建对应远程库的别名 7 git remote add origin .. / remote - repository.git 8 git remote // 列出远程库 9 git remote - v // 显示所有的远程仓库 10 git remote rename github gh // 重命名远程仓库 11 git remote rm github // 删除远程仓库 12 13 14 // 从远程库拉去代码 15 git pull -- rebase 16 // 提交代码到远程库 17 git push .. / remote - repository.git 18 git push origin 19 20 // 打tag 21 git tag version1. 6 - m ' version 1.6 ' 22 23 // 解决冲突 24 git mergetool

github

   
   
   
   
1 Global setup: 2 Set up git 3 git config -- global user.name " Your Name " 4 git config -- global user.email [email protected] 5 6 Next steps: 7 mkdir hibernaet - demo2 8 cd hibernaet - demo2 9 git init 10 touch README 11 git add README 12 git commit - m ' first commit ' 13 git remote add origin [email protected]:defnngj / hibernaet - demo2.git 14 git push - u origin master 15 16 Existing Git Repo? 17 cd existing_git_repo 18 git remote add origin [email protected]:defnngj / hibernaet - demo2.git 19 git push - u origin master 20 21 Importing a Subversion Repo? 22 Click here 23 When you ' re done: 24 Continue

git参考资料

git/github初级运用自如

gitHub help https://help.github.com/articles/set-up-git

Git 的origin和master分析 http://lishicongli.blog.163.com/blog/static/1468259020132125247302/

github简单使用教程

GitHub详细教程 

git remote

如何高效利用GitHubhttp://www.yangzhiping.com/tech/github.html

你可能感兴趣的:(GitHub使用)