有一个小时时间的请移步-> 廖雪峰Git教程
只有3分钟的同学请往下看
↓
Why Git ? 分布式版本控制系统
Git命令简介
git init //初始化git环境 git config --list git clone <url> //从<url>克隆一个仓库到本地 git pull //拉取代码 git add <file location> //添加新文件 git commit -m "<what did you do>" //提交改动,并添加注释 git push //推送代码
git status //查看当前状态 git branch //列出当前分支 git checkout <branch_name> //切换分支 git tag //列出标签 git diff //比较尚未暂存和上次提交的区别 git log //show git commit log git reflog //show git command log git stash list //列出储藏的工作 git stash save //将当前修改(工作)存储到栈上 git stash pop //应用储藏然后立即从栈上扔掉它
[alias] //常用alias st = status ci = commit df = diff co = checkout br = branch