git 问题咨询
source link: https://www.v2ex.com/t/845078
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
git 用的比较少, 所以来询问一下大佬们,我遇到如下场景有什么方式可以处理。 目前项目只有一个分支,master 分支。 假如我目前在开发当前项目的 V1.2 版本,但是 V1.1 版本有 BUG 时,我需要修改对应的代码。 但是 V1.2 版本的新功能不可能在一次 BUG 修复中就发布出来。那么此时我应该怎么处理 V1.2 版本新功能的代码呢?
可以不通过新建一次分支的情况下处理嘛。 [这是重点哦]
fiypig 3 小时 54 分钟前 via iPhone
dvsilch 3 小时 48 分钟前
gengchun 3 小时 47 分钟前
https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
Because a branch in Git is actually a simple file that contains the 40 character SHA-1 checksum of the commit it points to, branches are cheap to create and destroy. Creating a new branch is as quick and simple as writing 41 bytes to a file (40 characters and a newline).
pagxir 3 小时 45 分钟前 via Android
marat1ren 3 小时 43 分钟前 via iPhone
CEBBCAT 3 小时 39 分钟前 via iPhone
但是你这么做,用的还是 git 吗?以上操作有较高的丢失代码的风险。你未来开发到 2.0 的时候,又该要怎么修复 1.1 的 bug 呢?
nightwitch 2 小时 50 分钟前
本地的 master 有一堆 v1.2 的代码还没实现完,rebase 到修复完 bug 的分支上。
christin 2 小时 43 分钟前 via iPhone
msg7086 1 小时 2 分钟前
zkd8907 47 分钟前
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK