-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_chain.bat
More file actions
80 lines (42 loc) · 1.02 KB
/
Copy pathgit_chain.bat
File metadata and controls
80 lines (42 loc) · 1.02 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@Echo Batch script for demo - how to handle with remote working copy
@Echo main_repo - main (bare) repo
@Echo first_wc - work clone of main repo
@Echo second_bare - bare clone of main repo. Used as remote shared
@Echo third_wc - work clone of second_bare
@echo Create bare host repo
git init --bare main_repo
@echo Create first working clone
git clone main_repo first_wc
cd first_wc
echo 123 > 1.txt
git add 1.txt
git status
git commit -m "1 from first wc"
git push origin master:master
cd ..
@echo Create bare clone for remote shared
git clone --bare main_repo second_bare
@echo Create work clone from remote shared
git clone second_bare third_wc
cd first_wc
echo 456 >> 1.txt
git add 1.txt
git commit -m "2 from first wc"
git push
cd ..\second_bare
git --no-pager log
git fetch origin master:master
git --no-pager log
cd ..\third_wc
git fetch
git pull
echo 789 >> 1.txt
git add 1.txt
git commit -m "3 from third wc"
git push
cd ..\second_bare
git push
cd ..\first_wc
git pull
git --no-pager log
type 1.txt