(资源)Git优秀学习资源

在线教程

Try Git: Git初学者绝不能错过的Git上手资源.

廖雪峰Git教程: 比较系统的中文在线教程

易百Git教程 : 另一个比较全的中文在线教程

Git Immersion : 

A Visual Git Reference :图解Git.

常用指令

Everyday Git with 20 commands or so : 常用命令总结.

Git Cheatsheet : 很好很直观.

书籍

Git Community Book中文版

Pro Git 第二版

关于GitHub

蒋鑫 GotGitHub : 关于GitHub的介绍, 作者很给力.

其他

gitk : 如何使用Git可视界面.

A successful git branch model : 分支模型示例

实例

OpenStack Git Branch Model

创建新的分支,并从指定远端分支获取代码到新的分支

git checkout -b <local_new_branch> <remote_branch>

e.g.

  git checkout -b kilo origin/stable/kilo

从指定远端分支拉取代码

git pull <remote_repo> <remote_branch>:<local_branch>

向指定远端分支推送代码

git push <remote_repo> <local_branch>:<remote_branch>

删除远程分支

git push origin  :<branch-name>

 

重命名本地分支

git branch -m <old_branch_name> <new_branch_name>
原文地址:https://www.cnblogs.com/Security-Darren/p/3838321.html