Capistrano - 在 Git 中合并的最佳方式?

发布于 2025-01-04 16:57:02 字数 119 浏览 4 评论 0原文

capistrano 是否有内置的东西或扩展来执行合并?

希望有一个任务在部署之前在 2 个分支上进行合并。我知道我可以编写一个任务来执行此操作,但我是 Capistrano 的新手,不知道是否有内置的东西?

Does capistrano have anything built in or an extension to perform merges?

would like to have a task that before deploying does a merge on 2 branches. i know i can write a task to do this but i'm new to capistrano and didn't know if there is something built in?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流云如水 2025-01-11 16:57:02
set :destination, "the_branch_you_want_to_merge_to"
set :origin, "the_branch_you_want_to_merge_from"
set :merge_message, "your message"

run "git checkout #{destination}; git merge --squash #{origin}; git add . -A; git commit -m #{merge_message};"

但是我不会推荐这样做,因为如果您在合并中遇到任何冲突,您可能会破坏您的上限部署;)

set :destination, "the_branch_you_want_to_merge_to"
set :origin, "the_branch_you_want_to_merge_from"
set :merge_message, "your message"

run "git checkout #{destination}; git merge --squash #{origin}; git add . -A; git commit -m #{merge_message};"

But i'll not recommend this because you might break your cap deploy if ever you get any conflict in your merge ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文