简体   繁体   English

带有VS2015的Git-程序的新版本,但保留以前版本的副本

[英]Git with VS2015 - New version of program, but keep copy of previous

I have developed an application using VS2015 and Git for source control (local repository only). 我已经开发了使用VS2015和Git进行源代码控制的应用程序(仅本地存储库)。

I want to keep a copy of the app as it is and then create a new app based on the old one. 我想按原样保留该应用程序的副本,然后在旧应用程序的基础上创建一个新应用程序。 I know I can branch, but isn't the purpose of branching to eventually merge back with the trunk? 我知道我可以分支,但是分支的目的不是最终与主干合并吗? I don't want to do that - I want to keep a copy of the original app. 我不想这样做-我想保留原始应用程序的副本。

I'm sure I can probably roll back or something in Git, but that's not really desirable either. 我确定我可以回滚或在Git中进行某些操作,但这也不是很理想。

Appreciate some guidance on the "correct" way to do what I'm trying to achieve. 赞赏一些“正确”的方法来做我想要达到的目标。

Hope this makes sense, let me know if more detail is needed. 希望这有意义,让我知道是否需要更多细节。

I know I can branch, but isn't the purpose of branching to eventually merge back with the trunk? 我知道我可以分支,但是分支的目的不是最终与主干合并吗? I don't want to do that - I want to keep a copy of the original app. 我不想这样做-我想保留原始应用程序的副本。

Not necessarily. 不必要。 You could create a branch and never merge back. 您可以创建分支,再也不会合并。 Do what you want. 做你想做的。

If you are pretty sure you will never modify the initial app, perhaps use a tag is a better idea (and you will be able to create the 2nd branch once needed), otherwise creating a branch is perfectly fine. 如果您确定您永远不会修改初始应用程序,则最好使用标签(并且您将能够在需要时创建第二个分支),否则创建分支就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM