Git工作流程提示 [英] Git workflow tips

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

问题描述

我开始使用git,现在已经使用它几个月了,我很好奇我的工作流程是否正确。我在这个项目的两个不同的地方工作。这里是我的工作流程的阶段:


  1. 我从远程仓库拉项目

  2. 新功能的本地分支
  3. 进行更改并提交

  4. 将分支合并到master

  5. 远程

是这个项目工作的正确方式吗?

解决方案

正如Amber所说:


首先,让我们明确一点:没有单一的正确Git的
工作流程。只有工作流程可行 - 特别是
,工作流程适合你。


有一篇很好的文章关于一个好的git工作流的博客:

一个成功的Git分支模型



您应该阅读这篇文章,它非常酷,您可以根据需要调整工作流程。
简而言之,博客文章提出的工作流程如下图所示:



我已经采用了这个工作流了一段时间。我尝试始终尊重工作流程,无论是团队合作还是独自工作。


I started using git and have been using it for couple of months now, and I am curious if my workflow is correct. I work from two different places on the project. here are the stages of my workflow:

  1. I pull the project from remote repo
  2. make a local branch for a new feature
  3. make changes and commit
  4. merge the branch with master
  5. push to the remote

is this correct way of working on the project?

解决方案

As Amber said :

First, let's just make something clear: there is no single "correct" workflow for Git. There are merely workflows that work - and specifically, workflows that work for you.

There is a good post on a blog about a good git workflow :

A successful Git branching model

You should read this post, it's really cool and you can adapt the workflow to your needs. In a nutshell, the workflow proposed by the blog post schematized like this :

I have adopted this workflow for a while. I try to always respect the workflow, whether it's a teamwork or working alone.

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

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