En résumé : on peut faire un cherry-pick d'un commit d'une branche dans une autre, puis faire un merge de ces 2 branches et cela devrait fonctionner sans duplication. Sinon, il faudra régler le conflit à l'ancienne.
Pour éviter aussi la duplication dans l'historique, on peut utiliser "rebase".
-
-
https://stackoverflow.com/questions/14486122/how-does-git-merge-after-cherry-pick-work
git reflog
git reset HEAD@{index before the amend}
git commit ...
-
-
http://stackoverflow.com/questions/1459150/how-to-undo-git-commit-amend-done-instead-of-git-commitSomething wrong
git reflog
# you will see a list of every thing you've done in git, across all branches!
# each one has an index HEAD@{index}
# find the one before you broke everything
git reset HEAD@{index}
# magic time machine
I accidentally committed to the wrong branch!
# undo the last commit, but leave the changes available
git reset HEAD~ --soft
git stash
# move to the correct branch
git checkout name-of-the-correct-branch
git stash pop
git add . # or add individual files
git commit -m "your message here"
# now your changes are on the correct branch
Oui, quelqu'un paie un nom de domaine chaque année pour ça. Merci quand même :-)
-
-
http://ohshitgit.com/Excellent petit outil pour browser des repo Git via le Web.
-
-
https://wiki.archlinux.org/index.php/CgitPour partager un repository Git entre Windows et Linux, j'utilise ces configurations dans mon ~/.gitconfig.
Pour Windows (on ne touche pas aux permissions des fichiers, on transforme les éventuels \r\n en \n à chaque commit mais sans les modifier dans notre workspace)
git config --global core.filemode false
git config --global core.autocrlf true
Pour Linux (on commit aussi les permissions des fichiers, et on transforme les éventuels \r\n en \n dans notre workspace)
git config --global core.filemode true
git config --global core.autocrlf input
Et je vérifie que ces paramètres ne sont pas présents dans les .git/config de chacun de mes projets.
-
-
http://git-scm.com/book/fr/v1/Personnalisation-de-Git-Configuration-de-GitA utiliser avec parcimonie, mais c'est bien pratique.
-
-
https://help.github.com/articles/remove-sensitive-data/Y a plus qu'à !
-
-
http://www.git-attitude.fr/2014/05/04/bien-utiliser-git-merge-et-rebase/Ma configuration de Git.
-
-
http://30minparjour.la-bnbox.fr/2014/configuration-gitTrès bonne ressource : Linux, Symfony2, SVN, Git, ...
via nicosombs
-
-
http://www.guidella.com/General/liste.html