Zum Inhalt springen

Git Flow: Unterschied zwischen den Versionen

Aus Computech CMS Wiki
Frederick (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Frederick (Diskussion | Beiträge)
Zeile 4: Zeile 4:


== Branch Names ==
== 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 for. 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 Slides])([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 for in Drupal web development. The original names may make more sense when developing code and not building a website as we want to do. 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
*'''dev''' (Originally develop) - This is the branch were development work is started from and merge back into.
test
*'''test''' (Originally releases) - This is the branch where code gets tested in a environment identical to where it will be used. 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.
live
*'''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''' - Feature branches are checked out from the dev branch. For each feature a branch should be made then merged back into the dev branch as needed.
hotfix branches
*'''bugfix branches''' - (Originally hotfix) Bugfix branches are checked out from the dev branch to fix a bug in the code not for new development of features.
 
For both the feature and bugfix branches after the final merge back into dev the branch can be deleted.

Version vom 17. Dezember 2016, 22:22 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).

Vincent Driessen Git Flow Diagram

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

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 for in Drupal web development. The original names may make more sense when developing code and not building a website as we want to do. 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 (Originally releases) - This is the branch where code gets tested in a environment identical to where it will be used. 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.
  • 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 as needed.
  • bugfix branches - (Originally hotfix) Bugfix branches are checked out from the dev branch to fix a bug in the code not for new development of features.

For both the feature and bugfix branches after the final merge back into dev the branch can be deleted.