码迷,mamicode.com
首页 > 其他好文 > 详细

git总结

时间:2017-09-11 21:05:51      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:splay   git   tab   www   UI   one   form   order   git am   

生成patch

git diff

  • 创建并切换新的分支
git branch new
git checkout new
  • 在新分支里进行修改 并提交
echo "hello world" >> main.c
git add main.c
git commit -m "add hello world"
  • 生成patch
git diff master > 1.patch
  • 合入patch
git apply 1.patch

git format-patch

  • 创建分支 提交修改 同上
  • 生成patch
git format-patch master
  • 合入patch
git am 1.patch

放弃所有未提交的修改

git checkout .

推送至远程仓库

git push origin master #推送master分支

更新本地仓库

git pull

标签

git tag 1.0.0 <哈希码>

好用的GUI客户端

  • GitKraken
  • gitg

<wiz_tmp_tag id="wiz-table-range-border" contenteditable="false" style="display: none;">





git总结

标签:splay   git   tab   www   UI   one   form   order   git am   

原文地址:http://www.cnblogs.com/logic-wei/p/7506704.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!