• 环境配置

    设置global user.email

    git config --global user.email "email@.."

    设置global user.name

    git config --global user.name "your-name"
  • 常规操作

    克隆github地址

    git clone  https://.........

    查看状态

    git  status

    添加要添加的文件

    git  add <name>

    重置操作

    git  reset   --hard

    提交操作

    git  commit  <name>

    初始化操作

    git  init

    推送

    git  push
  • git 分支的使用

    查看分支:

    git branch

    创建分支:

    git branch <name>

    切换分支:

    git checkout <name>

    创建+切换分支:

    git checkout -b <name>

    合并某分支到当前分支:

    git merge <name>

    删除分支:

    git branch -d <name>
posted on 2016-05-02 10:09  zeopean  阅读(150)  评论(0编辑  收藏  举报