首页 > 其他 > 详细

git 的使用

时间:2016-05-02 10:30:57      阅读:261      评论:0      收藏:0      [点我收藏+]
  • 环境配置

    设置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>

git 的使用

原文:http://www.cnblogs.com/zeopean/p/git.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!