forked from infotainment/linuxpedia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_mirror_setup
More file actions
26 lines (17 loc) · 979 Bytes
/
Copy pathgit_mirror_setup
File metadata and controls
26 lines (17 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Ref : https://help.github.com/articles/duplicating-a-repository
---------------------------------------------------------------------------------------------------------------------------
Prototype
git clone --mirror https://github.com/exampleuser/repository-to-mirror.git
# Make a bare mirrored clone of the repository
cd repository-to-mirror.git
git remote set-url --push origin https://github.com/exampleuser/mirrored
# Set the push location to your mirror
---------------------------------------------------------------------------------------------------------------------------
Implementation
git clone --mirror http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.git
# Make a bare mirrorred clone of the repository
cd xxxx.git
git remote set-url --push origin <<xxxxx<<<mirror repo patch>>>>>.git
git fetch -p origin
git push --mirror
---------------------------------------------------------------------------------------------------------------------------