equipes:devteam:gitflow

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
equipes:devteam:gitflow [2020/11/27 16:42]
garciaflores créée
equipes:devteam:gitflow [2020/11/28 12:23] (Version actuelle)
garciaflores [Fixing a bug or adding a new feature]
Ligne 1: Ligne 1:
-====== LIPN Git-flow cheatsheet ======+====== LIPN Git-flow guide ======
 At #LipnDevTeam we follow the [[https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow|gitflow]] protocol  At #LipnDevTeam we follow the [[https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow|gitflow]] protocol 
 ===== Git flow installation and initialization ===== ===== Git flow installation and initialization =====
Ligne 31: Ligne 31:
 If you are fixing a bug from a project of LIPN's [[https://depot.lipn.univ-paris13.fr/|gitlab]], you should first create a special Git branch for the bug you are fixing. This can be done with `git flow`. You just have to type from the command line: If you are fixing a bug from a project of LIPN's [[https://depot.lipn.univ-paris13.fr/|gitlab]], you should first create a special Git branch for the bug you are fixing. This can be done with `git flow`. You just have to type from the command line:
 ```bash ```bash
-$ git flow start bugfix bug31_bibtex_import+$ git flow bugfix start bug31_bibtex_import
 ``` ```
 +You should get the following answer from git flow:
 +```javascript
 +Branches 'develop' and 'origin/develop' have diverged.
 +And local branch 'develop' is ahead of 'origin/develop'.
 +Basculement sur la nouvelle branche 'bugfix/bug31_bibtex_import'
 +
 +Summary of actions:
 +- A new branch 'bugfix/bug31_bibtex_import' was created, based on 'develop'
 +- You are now on branch 'bugfix/bug31_bibtex_import'
 +
 +Now, start committing on your bugfix. When done, use:
 +
 +     git flow bugfix publish bug31_bibtex_import
 +```
 +
 This will create a new branch called `bugfix31_bibtex_import` and switch your git to it. Afterwards you can commit and push as usual until you bug has been fixed.  This will create a new branch called `bugfix31_bibtex_import` and switch your git to it. Afterwards you can commit and push as usual until you bug has been fixed. 
  
Ligne 40: Ligne 55:
 ``` ```
 Of course, instead of `bug31_bibtex_import` you will type the name of the bug you are fixing. You should get the following result, if everything works fine: Of course, instead of `bug31_bibtex_import` you will type the name of the bug you are fixing. You should get the following result, if everything works fine:
 +
 +<blockquote>
 ```bash ```bash
 Énumération des objets: 26, fait. Énumération des objets: 26, fait.
Ligne 61: Ligne 78:
 - The local branch 'bugfix/bug31_bibtex_import' was configured to track the remote branch - The local branch 'bugfix/bug31_bibtex_import' was configured to track the remote branch
 - You are now on branch 'bugfix/bug31_bibtex_import' - You are now on branch 'bugfix/bug31_bibtex_import'
-``` +``` 
 +</blockquote>
  
 Finally, you have to open the URL indicated after the "//To create a merge request for bugfix/bug31_bibtex_import, visit://" message and request that your branch is merged with develop.  Finally, you have to open the URL indicated after the "//To create a merge request for bugfix/bug31_bibtex_import, visit://" message and request that your branch is merged with develop. 
  
 If instead or fixing a bug you want to add a new feature, you just need to follow the same method, replacing the `bugfix` keyword for `feature` in every one of the above `git flow` commands.  If instead or fixing a bug you want to add a new feature, you just need to follow the same method, replacing the `bugfix` keyword for `feature` in every one of the above `git flow` commands. 
 +
 +If you want to continue with the next bug before the merge has been realized, you need to checkout `develop` again, and then restart the whole flow. When you go [[https://depot.lipn.univ-paris13.fr/etamine/plugins/publications/-/merge_requests|to the git lab to make the merge request]] of your branch, you have to pay attention to ask for a merge with `develop` branch:
 +{{:equipes:devteam:screenshot_20201128_132021.png?400|}}
  
  
  • Dernière modification: il y a 3 ans