"Update git sheetcheat for git submodules"
This commit is contained in:
@@ -22,6 +22,15 @@ Clonage
|
|||||||
|
|
||||||
``git clone <url>``
|
``git clone <url>``
|
||||||
|
|
||||||
|
Ou, métode que je préfère pour plus de clareté avec ``git log``, on merge dans un git init neuf
|
||||||
|
|
||||||
|
``mkdir /path/to/project``
|
||||||
|
``cd /path/to/project``
|
||||||
|
``git init``
|
||||||
|
``git remote add origin ssh://user@git-server/path/to/myrepo.git``
|
||||||
|
``git pull``
|
||||||
|
``git merge origin/master``
|
||||||
|
|
||||||
Pousser un dépot local sur un dépot distant qui vient d'être initalisé
|
Pousser un dépot local sur un dépot distant qui vient d'être initalisé
|
||||||
|
|
||||||
``git remote add origin ssh://user@git-server/path/to/myrepo.git``
|
``git remote add origin ssh://user@git-server/path/to/myrepo.git``
|
||||||
@@ -120,3 +129,26 @@ aussi souvent que nmécessaire
|
|||||||
``git rebase -i origin/master``
|
``git rebase -i origin/master``
|
||||||
|
|
||||||
``git push``
|
``git push``
|
||||||
|
|
||||||
|
Git Submodules
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Ajouter un submodule
|
||||||
|
|
||||||
|
``git submodule add ssh://user@server/path/to/submodule.git submodule/path``
|
||||||
|
``cd submodule/path``
|
||||||
|
``rm -fr .* *``
|
||||||
|
``git init``
|
||||||
|
``git remote add origin ssh://beastie@ssh.debian-server/path/to/submodule.git``
|
||||||
|
``git merge origin/master``
|
||||||
|
``git commit -a``
|
||||||
|
``git push``
|
||||||
|
|
||||||
|
Modifier un submodule
|
||||||
|
|
||||||
|
``cd path/to/submodule``
|
||||||
|
``git commit -a``
|
||||||
|
``git push``
|
||||||
|
``cd path/to/project``
|
||||||
|
``git commit -a``
|
||||||
|
``git push``
|
||||||
|
|||||||
Reference in New Issue
Block a user