Zum Inhalt springen

Git Flow: Unterschied zwischen den Versionen

Aus Computech CMS Wiki
Frederick (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Frederick (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
Git Flow is a collection of Git extensions to provide high-level repository operations for [http://nvie.com/posts/a-successful-git-branching-model/ Vincent Driessen's Git Flow branching model] ([http://nvie.com/files/Git-branching-model.pdf PDF Diagram of GitFlow branching]).
Git Flow is a collection of Git extensions to provide high-level repository operations for [http://nvie.com/posts/a-successful-git-branching-model/ Vincent Driessen's Git Flow branching model] ([http://nvie.com/files/Git-branching-model.pdf PDF Diagram of GitFlow branching]). Git Flow does not take away the ability to use the normal Git commands. It does group together commands needed to carry out a Git Flow branching method step without the user needing to remember all the multiple necessary steps needed to finish what should be a simple step.


=== Vincent Driessen's Blog Post - "A successful Git branching model" ===
=== Vincent Driessen's Blog Post - "A successful Git branching model" ===
Zeile 18: Zeile 18:
One important thing to note is that the branch names are only that names. There is nothing special about the branch names and you can setup the names to be what you want. I tried to use a set of branch names that were short but also described what the branch was used for in Drupal web development. The original names may make more sense when developing software code. I use the names from Shawn DeArmond's presentation at Bad Camp 2012 called "[ Development Workflow With Git]"([http://dearmond.net/blog/2012/11/drupal-development-workflow-git Blog Post]) ([http://dearmond.net/sites/dearmond.net/files/media/2012/11/dev_workflow_with_git.pdf PDF of Slides (slide 23 has the branch names)])([https://vimeo.com/52891166 Video of Presentation]) as they made the most sense of any I saw. Here is a list of the branch names that I use with a reference to the branch name that Vincent used in his original article.
One important thing to note is that the branch names are only that names. There is nothing special about the branch names and you can setup the names to be what you want. I tried to use a set of branch names that were short but also described what the branch was used for in Drupal web development. The original names may make more sense when developing software code. I use the names from Shawn DeArmond's presentation at Bad Camp 2012 called "[ Development Workflow With Git]"([http://dearmond.net/blog/2012/11/drupal-development-workflow-git Blog Post]) ([http://dearmond.net/sites/dearmond.net/files/media/2012/11/dev_workflow_with_git.pdf PDF of Slides (slide 23 has the branch names)])([https://vimeo.com/52891166 Video of Presentation]) as they made the most sense of any I saw. Here is a list of the branch names that I use with a reference to the branch name that Vincent used in his original article.


*'''dev''' (Originally develop) - This is the branch were development work is started from and merge back into.
==== dev ====
*'''test''' - This is the branch where code ideally gets tested in a environment identical to where it will be used live. In Drupal this is where the the code from the dev branch and the database from the live site can be tested together to see if things work as expected. In the original branching model a new release branch was created for each new release. I add tag version number tags to releases pushed to the test branch.
(Originally develop) - This is the branch were development work is started from and merge back into.
*'''live''' (Originally master) - This is the branch that is used on the live website. Pushing to this branch and then deploying results in the code going live.
==== test ====
This is the branch where code ideally gets tested in a environment identical to where it will be used live. In Drupal this is where the the code from the dev branch and the database from the live site can be tested together to see if things work as expected. This is an additional branch that is pushed to for deployment to the testing server. This branch is not in the original Git Flow branching method.
==== live ====
(Originally master) - This is the branch that is used on the live website. Pushing to this branch and then deploying results in the code going live.


*'''feature branches''' - Feature branches are checked out from the dev branch. For each feature a branch should be made then merged back into the dev branch when the work is finished. These branches are normally only in a developer's development environment. If other developers need to have this code before it is finished Git Flow has a publish method that allows pushing the feature branch to the remote so other developers can then have access to it.
==== feature branches ====
*'''hotfix branches''' - Hotfix branches are checked out from the live branch to fix a critical bug in the code on the live site. When finished, the hotfix branch should be merged to the test branch for testing. If all is well it should then be merged back into the live branch, but also needs to be merged back into the dev branch, in order to safeguard that the hotfix is included in the next release as well.
Feature branches are checked out from the dev branch. Feature branches are merged back into the dev branch when the work is finished and deleted. These branches are normally only in a developer's development environment. If other developers need to have this code before it is finished Git Flow has a publish method that allows pushing the feature branch to the remote so other developers can then have access to it.
 
==== hotfix branches ====
*'''bugfix branches''' - Since late in 2012 the original [https://github.com/nvie/gitflow Git Flow repository] by Vincent Driessen on Github is no longer being updated. Peter van der Does started a new repository on Github in early 2012 called [https://github.com/petervanderdoes/gitflow-avh gitflow-avh]. Ubuntu and other Linuxes have switched to this repository for the packages they include for git-flow. Bugfix branches are one of the new features that was added in the git-flow-avh (A VirtualHome). FIXME
Hotfix branches are checked out from the live branch to fix a critical bug in the code on the live site. When finished, the hotfix branch should be merged to the test branch for testing. If all is well then the normal `git flow hotfix finish` command can be used to merge it back into the live branch, and also merge it into the dev branch, so that the hotfix is included in the next release as well.
*'''release branches''' -
==== bugfix branches ====
 
Bugfix branches are checked out from the dev branch to fix bugs in the development branch. When finhished they are merged back into the dev branch.s Since late in 2012 the original Git Flow repository by Vincent Driessen on Github is no longer being updated. Peter van der Does started a new repository on Github in early 2012 called gitflow-avh. Ubuntu and other Linuxes have switched to this repository for the packages they include for git-flow. Bugfix branches are one of the new features that was added in the git-flow-avh (A VirtualHome).
For the feature, bugfix, and hotfix branches after the final merge back into needed branches the branch can be deleted.
==== release branches ====

Version vom 19. Dezember 2016, 07:46 Uhr

Git Flow is a collection of Git extensions to provide high-level repository operations for Vincent Driessen's Git Flow branching model (PDF Diagram of GitFlow branching). Git Flow does not take away the ability to use the normal Git commands. It does group together commands needed to carry out a Git Flow branching method step without the user needing to remember all the multiple necessary steps needed to finish what should be a simple step.

Vincent Driessen's Blog Post - "A successful Git branching model"

Vincent Driessen's Blog Post on Tuesday, January 05, 2010 titled "A successful Git branching model" is origin of what is called to today the Git Flow branching model.

Vincent Driessen Git Flow Diagram

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

Getting started - Introduction to Git Flow

For the best introduction to getting started with git flow, please read Jeff Kreeftmeijer's blog post:Using git-flow to automate your git branching workflow

Using Git Flow for Drupal Website Development

The Git Flow branching method can and is used by teams developing Drupal website. Depending on your deployment method some slight changes maybe needed. The names of the branches given in the original Git Flow method make sense for developing code but other names may make more sense when it is used for Drupal website development.

Branch Names

One important thing to note is that the branch names are only that names. There is nothing special about the branch names and you can setup the names to be what you want. I tried to use a set of branch names that were short but also described what the branch was used for in Drupal web development. The original names may make more sense when developing software code. I use the names from Shawn DeArmond's presentation at Bad Camp 2012 called "[ Development Workflow With Git]"(Blog Post) (PDF of Slides (slide 23 has the branch names))(Video of Presentation) as they made the most sense of any I saw. Here is a list of the branch names that I use with a reference to the branch name that Vincent used in his original article.

dev

(Originally develop) - This is the branch were development work is started from and merge back into.

test

This is the branch where code ideally gets tested in a environment identical to where it will be used live. In Drupal this is where the the code from the dev branch and the database from the live site can be tested together to see if things work as expected. This is an additional branch that is pushed to for deployment to the testing server. This branch is not in the original Git Flow branching method.

live

(Originally master) - This is the branch that is used on the live website. Pushing to this branch and then deploying results in the code going live.

feature branches

Feature branches are checked out from the dev branch. Feature branches are merged back into the dev branch when the work is finished and deleted. These branches are normally only in a developer's development environment. If other developers need to have this code before it is finished Git Flow has a publish method that allows pushing the feature branch to the remote so other developers can then have access to it.

hotfix branches

Hotfix branches are checked out from the live branch to fix a critical bug in the code on the live site. When finished, the hotfix branch should be merged to the test branch for testing. If all is well then the normal `git flow hotfix finish` command can be used to merge it back into the live branch, and also merge it into the dev branch, so that the hotfix is included in the next release as well.

bugfix branches

Bugfix branches are checked out from the dev branch to fix bugs in the development branch. When finhished they are merged back into the dev branch.s Since late in 2012 the original Git Flow repository by Vincent Driessen on Github is no longer being updated. Peter van der Does started a new repository on Github in early 2012 called gitflow-avh. Ubuntu and other Linuxes have switched to this repository for the packages they include for git-flow. Bugfix branches are one of the new features that was added in the git-flow-avh (A VirtualHome).

release branches