====== Git ====== * [[https://git-scm.com/docs/gitignore|.gitignore]] ===== En cas de soucis avec les submodules ===== [[https://git-scm.com/docs/gitsubmodules|Source]] git pull --recurse-submodules L'option **--recurse-submodules** peut s'utiliser sur presque toutes les commandes git et à l'air de mieux marcher que les git submodule. **Cool commands :** // Discard changes to last commit of this branch git reset --hard ===== Ajouter un remote sur un repo local déjà existant ===== git remote add origin git@gitlab.com:Dolomich/multiview-vimeo.git Testé sur GitLab, j'ai dû faire le push avec gitKraken mais c'était sûrement un problème de login. ===== Ajouter des clés SSH aux lignes de commandes ===== //Nécessaire pour Sublime Merge// - [[https://gitlab.com/help/ssh/README#generating-a-new-ssh-key-pair|GitLab doc]] Saved in the program folder, despite showing the User one. For this to actually work in Windows need to manually add the key in the config :\\ **C:\Program Files\Git\etc\ssh\ssh_config** Host * AddKeysToAgent yes IdentityFile ~/.ssh/id_ed25519/gitLab Test with **ssh -T git@gitlab.com** //(-vvvT for verbose)// ----------------- ==== Versionning avec Git ==== Git : s'en servir pour déployer un site ? [[http://www.alsacreations.com/article/lire/1647-synchroniser-son-serveur-web-avec-github.html|Article Alsacréation pour synchro GitHub]] (méfiance)\\ [[http://bfontaine.net/staticblog/Git/2012/04/10/synchroniser-deux-depots-git-en-local.html]]\\ [[https://netbeans.org/kb/docs/ide/git.html#remote]]\\ [[https://programmaticponderings.wordpress.com/2013/11/13/building-a-deployment-pipeline-using-git-maven-jenkins-and-glassfish-part-2-of-2/]]\\ [[http://www.thehorrors.org.uk/snippets/git-local-filesystem-remotes/]]\\ [[http://longair.net/blog/2009/04/16/git-fetch-and-merge/]]\\ Utiliser Git en local sur netbeans pour versionner les projets ? Qu'est-ce que ça change pour la mise en ligne ? Go **GitKraken**