git - Can i move commits from dev to master using rebase?
问题描述
I discovered recently how to use the rebase command.
I have a master and a dev branch and to me it seems really convenient to just git rebase dev master
when I want to move the functional dev to the master branch.
(avoiding to do a pull request from dev to master and then using the git rebase master dev
command (because the pull request brings the master 1 commit ahead of dev)).
Is it a correct way of doing it? what am I missing? What are the possible drawbacks?
thanks
解决方案
一般来说,黄金法则是不要对其他人正在使用的分支进行变基...... dev 和 master 听起来像候选人......除非您是唯一的开发人员并且您知道自己在做什么。
重新定位由单个开发人员开发的功能分支?是的,当然……为什么不呢?在它被合并到任何公共分支之前,没有人会使用它......如果人们在它被合并之前真正开始使用它(它不时发生),应该理解他们的基础分支可能随时移动。
推荐阅读
- html - HTML / CSS | 滚动条 - 更改 div 和拇指悬停的颜色
- operating-system - 操作系统如何处理外围数据缓冲区?
- flutter - 连续两列自动缩放图像?
- angular - 单元测试中未调用 setTimout 中的函数
- for-loop - 减少几个 do 循环的计算时间以计算总和
- c# - GeckoFX45 与 System.AccessViolationException 崩溃
- amazon-web-services - Athena 返回“返回零记录”
- symfony - 无法自动装配参数:Symfony 4
- python - 查找列表中的第 n 次幂
- android - 我想在使用 kotlin 协程的 android 超时后取消一个函数,但它不起作用