Skip to content

Clone & Initialise project

TristanEduProjet edited this page Dec 18, 2017 · 2 revisions

Introduction

Le projet utilise l'extension GitFlow pour la gestion des branches.
Note: Les environnement Windows avec Git for Windows possèdent cette extension.

Un peu de documentation si cette extension vous est inconnue :

Récupération du projet

Pour récupérer le projet, il suffit de cloner celui-ci, puis d'initialiser GitFlow (laisser les paramètres par défaut).

$ git clone --progress -v "git@github.com:TristanEduProjet/BookIndex.git" "BookIndex"
$ cd BookIndex
$ git checkout --track -b develop remotes/origin/develop --
$ git flow init
Which branch should be used for bringing forth production releases?
   - master
Branch name for production releases: [master]
Branch name for "next release" development: [develop]

How to name your supporting branch prefixes?
Feature branches? [feature/]
Bugfix branches? [bugfix/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []
Hooks and filters directory? [C:/Users/myuser/git/BookIndex/.git/hooks]

Pour vérifier la configuration : git flow config.
Le fichier .gitflow permet de surcharger les paramètres de GitFlow pour que tous les contributeurs aient des paramètres cohérents.

Commandes

Un petit récapitulatif des commandes de gitflow :

git flow <feature / release / hotfix> <start / finish / publish / pull> <NAME>

Features

  • git flow feature start MYFEATURE
  • commits vos changements (git add ......., git commit -m "....." ...)
  • git flow feature finish MYFEATURE
  • git push "origin" develop

Si vous êtes plusieurs à travailler sur une feature :

  • pour publier/pousser : git flow feature publish MYFEATURE
  • pour récupérer/tirer : git flow feature pull origin MYFEATURE et git flow feature track MYFEATURE

Release

  • git flow release start RELEASE ou git flow release start RELEASE [COMMIT BASE]
  • git flow release publish RELEASE
  • commits prepares/corrections (git add ......., git commit -m "....." ...)
  • git flow release finish RELEASE
  • git push origin master
  • git push --tags

Pour récupérer une livraison en cours : git flow release track RELEASE.
Pour pousser toutes les branches : git push --all --progress "origin".

Clone this wiki locally