0
* 6a2da68        (styleChange) merge fix in setting
* dac420f        added libs
* 622021c        merging changes
| * 18847ab      (production/master, master) added couple of cdns
| * 8f02c19      minified css files
| * 276649a      (HEAD, testminify) added libs
| * f4b9533      fixed fb
|/  
* 2b4b490        prod ready
* 685a99c        removed dj static from settings file
* 1f012bc        added mailing support
* eb69d26        modified wsgi and static files
* bbd5c76        settings
* 39b229b        deleted some files
* 7e8ecaa        Initial Commit

正如您在上面看到的那样,我的 head 已打开,276649a(添加的 libs提交)到目前为止,我想在 head 所在的提交之前删除所有提交,以便最终我的 git 图如下所示 -

* 276649a        (HEAD, testminify) added libs
* f4b9533        fixed fb
* 2b4b490        prod ready
* 685a99c        removed dj static from settings file
* 1f012bc        added mailing support
* eb69d26        modified wsgi and static files
* bbd5c76        settings
* 39b229b        deleted some files
* 7e8ecaa        Initial Commit

有什么办法可以美化我的 git 分支树吗?所以基本上我想摆脱多余的未来分支和几个提交。

谢谢!

4

2 回答 2

0

鉴于您不想出现的提交位于单独的分支上,如果您只删除这些分支就足够了:

git branch -D styleChange
git branch -D master
于 2013-07-19T18:10:29.880 回答
0

分离头然后移动主人

git checkout 276649a
git branch -f master HEAD
于 2013-07-19T18:48:49.403 回答