单一用户的Git工作流程 [英] Git workflow for single user

查看:99
本文介绍了单一用户的Git工作流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一家开发少数桌面应用程序和网站的单人店。几个月前,我开始使用GIT进行版本控制,并且我对此感到满意,但我的使用非常笨拙,我很想知道单个用户的工作流应该是什么。



现在,我在每个项目文件夹中都有一个.git文件夹。我每隔一段时间就会进行一次修改,然后继续工作。



我永远不会从Git存储库中取出任何东西(工作副本仍然存在,是否会被Git覆盖?),我不太确定会发生什么情况我创建了一个分支(在哪里创建了分支?同一个文件夹?)

换句话说,我使用Git主要是在需要时查看旧版本的差异,而仍然工作原理也一样。



没问题,即使是这样的基本设置也有优势,但我觉得我错过了这一点。

单人店的工作流程应该如何?


解决方案

我从来没有拉从Git的
仓库里面(的工作副本仍然是
那里,它会被
Git覆盖吗?),

使用git,工作副本 存储库! pull命令用于从其他存储库中提取更改。作为一个开发人员,你不需要它。


我不太确定如果我创建了一个分支会发生什么(Where is the )

在您的本地存储库中,是的。



< blockquote>

没关系,甚至像这样的基本设置都有优势,但我觉得我错过了这一点。

大部分git的令人兴奋的功能都是针对协作。请记住,它的开发是为了支持Linux内核的开发,在那里几乎有数百人贡献,只是跟踪和合并提交是一项全职工作。有些功能在这种极端情况下非常有用。



但对于单个开发人员也有一些重大优势。


单人店的工作流程应该如何?

您当前的工作流程正常(假设您定期进行备份;远程存储库也可以用于此目的)。它可以通过使用功能分支得到改善。这可以让你的版本历史在你同时处理几件事情时更清晰(并且有时可以防止严重的错误)。

一个有点相关的,非常有用的git特性是隐藏


I am a single man shop developing a handful of desktop applications and websites. I started using GIT for version control a few months ago, and I am reasonably happy with it, but my usage is pretty clumsy and I am wondering what the workflow should be for a single user.

Right now, I have a .git folder in each of my project folders. I commit my changes every once in a while and I just keep working on the working copy.

I never pull anything from the Git repository (the working copy is still there, would it get overwritten by Git?), and I am not quite sure what would happen if I created a branch (Where is the branch created? Same folder?)

In other words, I am using Git mostly to see differences with old versions when needed, while still working the same old way.

It's fine, and even a basic set-up like this has advantages, but I feel that I am missing the point.

What should the workflow be like for a one-man shop?

解决方案

I never pull anything from the Git repository (the working copy is still there, would it get overwritten by Git?),

With git, the "working copy" is a repository! The "pull" command is for pulling changes from other repositories. As a single developer you do not need it.

and I am not quite sure what would happen if I created a branch (Where is the branch created? Same folder?)

In your local repository, yes.

It's fine, and even a basic set-up like this has advantages, but I feel that I am missing the point.

Most of git's "new exciting" features are geared towards collaboration. Remember that it was developed to support the development of the Linux kernel, where literally hundreds of people contribute and simply keeping track of and merging the commits is a full-time job. Some of the features are useful pretty much only in such an extreme scenario.

But there are also some big advantages for single developers.

What should the workflow be like for a one-man shop?

Your current workflow is OK (assuming that you make regular backups; a remote repository can server that purpose as well). It could be improved by using feature branches. This allows your version history to be cleaner when you work on several things at the same time (and can prevent serious mistakes sometimes).

A somewhat related, very useful git feature is the stash.

这篇关于单一用户的Git工作流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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