ajout d'un paragraphe sur comment migrer un depot git
This commit is contained in:
parent
2793f2774c
commit
2c7f76334f
|
@ -680,4 +680,12 @@ $ git repack
|
||||||
$ git gc
|
$ git gc
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
### Migrer un dépot git
|
||||||
|
|
||||||
|
Il se peut qu'on change de forge (passage de gitolite à gitlab par
|
||||||
|
exemple) et il faut alors migrer les dépots. Un moyen de faire :
|
||||||
|
|
||||||
|
~~~{.bash}
|
||||||
|
$ for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do rbranch=$(echo $branch | tr '/' ' ' | awk '{print $3}') ; git checkout -b $rbranch $branch ; done
|
||||||
|
$ git remote add gitlab gitlab@gitlab.example.com:group/repo.git && git push gitlab --all && git remote remove origin && git remote rename gitlab origin && git push --set-upstream origin master
|
||||||
|
~~~
|
||||||
|
|
Loading…
Reference in a new issue