我在 Git 中有这个结构
develop C - D - E
/
master A - B
然后,我从开发中添加了一个新分支:
git checkout -b new_branch develop
这就是我得到的
new_branch C - D - E - F - G
/
develop C - D - E
它分支了,但新分支继承了开发的提交历史,而不是所需的结构:
new_branch F - G
/
develop C - D - E
我怎么能做到这一点?
编辑:开发日志输出
* 0c5b5fe Deleted changelog
* b20083f Added changelog. Version 1.2 Development
* b9d888b Merge branch 'ProgressHUD' into develop
|\
| * e310630 Modified .gitignore to ignore Instrument Tests
| * 9bb7ab7 Deleted code to remove "deletion while loading" functionality.
| * d139fef Fixed a few errors with RecentPhotos loading.
| * 6d52eb1 Added MBProgressHUD to the recents section
| * d98e09e Added MBProgressHUD functionality in the PersonList
| * 4c6fd41 Added MBProgressHUD Files.
* | 2f741e3 Modified .gitignore
|/
* ea1b51b Merged in glenwayguy/gitignore-edited-online-with-bitbucket-13693489
|\
| * bdb0996 .gitignore edited online with Bitbucket
|/
* 0fb68ec Initial Commit Version 1.1 Release
new_branch 日志输出:
* 0c5b5fe Deleted changelog
* b20083f Added changelog. Version 1.2 Development
* b9d888b Merge branch 'ProgressHUD' into develop
|\
| * e310630 Modified .gitignore to ignore Instrument Tests
| * 9bb7ab7 Deleted code to remove "deletion while loading" functionality.
| * d139fef Fixed a few errors with RecentPhotos loading.
| * 6d52eb1 Added MBProgressHUD to the recents section
| * d98e09e Added MBProgressHUD functionality in the PersonList
| * 4c6fd41 Added MBProgressHUD Files.
* | 2f741e3 Modified .gitignore
|/
* ea1b51b Merged in glenwayguy/gitignore-edited-online-with-bitbucket-13693489
|\
| * bdb0996 .gitignore edited online with Bitbucket
|/
* 0fb68ec Initial Commit Version 1.1 Release