Git
Patchs
en général
- Travailler sur une branche séparée, par exemple nouvelle branche locale:
git checkout -b MABRANCHE
- faire ses changements, git commit...
- Créer le patch par rapport à une autre branche (HEAD/master):
git format-patch master --stdout > monpatch.patch
changements déja éffectués
git stash save git branch MABRANCHE HEAD git checkout MABRANCHE git stash pop
appliquer
git apply --check monpatch.patch # puis recommiter # ou git am --signoff < monpatch.patch
Gitflow, ou utiliser les branches de manière intelligente
Redmine & Git
Lors d'un ajout d'un nouveau projet avec repository git existant, il peut être souhaitable de scanner l'historique en cli une première fois:
ruby script/runner "Repository.fetch_changesets" -e production