
git
oranyujian
python 攻城师
展开
-
git 打包和忽略文件的使用
一、git打包采取其他打包工具将整个工作区打包,会把版本库等一些其他不必要的信息打包,git提供了一个打包命令#基于最新的提交进行打包 git archive -o new.zip HEAD #基于tag进行打包,发布源码 git archive --format=tar --prefix=1.0/ v1.0 | gzip > test-1.0.tar.gz二、gi转载 2014-12-22 11:53:35 · 1392 阅读 · 0 评论 -
git cherry-pick, merge, rebase
现在的SourceTree状态如下:cherry-pick - 妈妈,我也要cherry-pick其实在工作中还挺常用的,一种常见的场景就是,比如我在A分支做了几次commit以后,发现其实我并不应该在A分支上工作,应该在B分支上工作,这时就需要将这些commit从A分支复制到B分支去了,这时候就需要cherry-pick命令了,B分支指着这些commit说:妈妈,我也要!比如转载 2015-03-26 10:18:21 · 737 阅读 · 0 评论 -
git stash 用法
git stash apply stash@{0}:只取出版本信息,并不将栈信息删除git stash pop stash@{0}:将版本信息去除后,删除栈信息git stash show:查询修改信息git stash show stash@{0}:查看对应栈中版本的修改信息最近在使用Git管理项目工程的时候,遇到了很多问题,也学习到了很多关于Git常见使用的技巧转载 2015-03-17 16:39:15 · 679 阅读 · 0 评论 -
10 个很有用的高级 Git 命令
I have been using git for quite some time now and thought of sharing some advanced git commands that you may find useful whether you are working in a team environment or on your personal project.1.转载 2015-04-08 14:39:56 · 531 阅读 · 0 评论 -
git rebase and merge
文章摘自gitbookrebase假设你现在基于远程分支"origin",创建一个叫"mywork"的分支。$ git checkout -b mywork origin现在我们在这个分支做一些修改,然后生成两个提交(commit).$ vi file.txt$ git commit$ vi otherfile.txt$ git co原创 2015-04-08 15:33:23 · 499 阅读 · 0 评论 -
git 回退操作
git reset:git reset --hard 回退到commit版本git revert:git revert 撤消commit的操作git merge --abort:git merge --abort 回退到merge之前的状态原创 2015-05-15 14:52:44 · 567 阅读 · 0 评论