保持Git特性分支最新的策略 [英] Strategy For Keeping Git Feature Branches Up to Date

查看:181
本文介绍了保持Git特性分支最新的策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢让我的功能分支与开发保持同步。经常做git merge --no-ff develop有什么不对吗?最后,运行git flow feature finish feature1。这些功能分支是共享的(这意味着其他人可能正在处理它,或者我正在家中的计算机上开发它),这主要是因为我喜欢知道它们是在别处备份的。如果他们不被分享,是否会一致重新分配?

I like to keep my feature branches up to date with develop. Is there anything wrong with frequently doing "git merge --no-ff develop". And then at the end, running "git flow feature finish feature1". These feature branches are shared (which means it is possible that someone else could be working on it, or that I'm developing out of it at my computer at home), mostly because I like knowing that they are backed up somewhere else. If they weren't shared, would consistently rebasing be preferred?

或者最好不要让你的功能分支保持最新状态,而只是将所有内容合并到最后?

Or is it better to not keep your feature branches up to date and just merge everything in at the end?

推荐答案

是的,我认为一致重新定义将是首选方法。并且git-flow目前有一个用于这个目的的命令(不知道这个命令是否在提问的时候): git flow feature rebase< featurename>

Yes, I think consistently rebasing would be the preferred method. And git-flow currently has a command that serves this purpose (not sure if this command was around when the question was asked): git flow feature rebase <featurename>.

这篇关于保持Git特性分支最新的策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆