我为一个功能(feat/logs_work
- 为日志工作)创建了一个分支,我已合并它。现在我想在同一个分支上工作(改进日志)。这是一种不好的做法吗?我可以创建一个新的分支或工作吗?
如果同样的话:
我有这样的事情:
* e534410 (HEAD, origin/master, master) merged
|\
| * 4f87921 (origin/feat/logs_work, feat/logs_work) Work 6
| * 8e2f2a3 Work 5
| * 1f08e04 Work 4
| * 2a13fcd Work 3
| * 66ec996 Work 2
| * 8bccdde Work 1
|/
* 30b9275 Previous merged
如何做得更好:
如果我结帐feat/logs_work
,它会执行以下操作:(**)
* XXXXXXX (HEAD, feat/logs_work) New work
* | e534410 (origin/master, master) merged
|\|
| * 4f87921 (origin/feat/logs_work, feat/logs_work) Work 6
| * 8e2f2a3 Work 5
我更喜欢这样的东西:
* XXXXXXX (HEAD, feat/logs_work) New work (adding more logs)
/
* e534410 (origin/master, master) merged
|\
| * 4f87921 (origin/feat/logs_work, feat/logs_work) Work 6
| * 8e2f2a3 Work 5
因为我会添加更多日志,这就是为什么我更喜欢在同一个feat/logs_work
分支上工作的原因。这不好吗?我要创建一个新的分支广告吗?我应该在(**)
案件中继续吗?我想要一些建议。
答案 0 :(得分:0)
可能是将master
合并到feat/logs_work
,并且具有如下内容:
* XXXXXXX (HEAD, feat/logs_work) New work
/|
* | e534410 (origin/master, master) merged
|\|
| * 4f87921 (origin/feat/logs_work, feat/logs_work) Work 6
| * 8e2f2a3 Work 5
我知道,对于我的情况并没有太大的不同/重要,但如果我在master
上做了一些其他更改,则会更新feat/logs_work
分支:
* XXXXXXX (HEAD, feat/logs_work) New work
/|
* | QQQQQQQ (origin/master, master) some other commit on master or some other merge
* | e534410 merged
|\|
| * 4f87921 (origin/feat/logs_work, feat/logs_work) Work 6
| * 8e2f2a3 Work 5