File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ Add subtrac-enhanced submodule to a parent project:
2
+
3
+ ``` sh
4
+ git clone
[email protected] :example/parent.git
5
+ cd parent/
6
+ git submodule
[email protected] :example/dep.git ../dep
7
+ git add .gitmodules dep
8
+ git commit -m ' add submodule'
9
+ cp /path/to/git-subtrac/git-fix-modules.sh .
10
+ ./git-fix-modules.sh
11
+ git subtrac --auto-exclude update
12
+ git push origin master master.trac
13
+ cd ..
14
+ ```
15
+
16
+ Another contribor clones parent repo and makes local change in a submodule:
17
+
18
+ ``` sh
19
+ git clone --recurse-submodules
[email protected] :example/parent.git another-parent
20
+ cd another-parent
21
+ ./git-fix-modules.sh
22
+ cd dep
23
+ git checkout master
24
+
25
+ echo ' local change' >> README
26
+ git commit -m ' locally patch dep' README
27
+ cd ..
28
+ git commit -m ' record change in parent' dep
29
+ git subtrac --auto-exclude update
30
+ git push origin master master.trac
31
+ cd ..
32
+ ```
33
+
34
+ Bring in changes from upstream and rebase:
35
+
36
+ ``` sh
37
+ cd parent/dep
38
+ git fetch
39
+ git rebase origin/master
40
+ git commit -m ' rebase dep on upstream changes' dep
41
+ git push origin master
42
+ ```
43
+
44
+ Share changes with upstream:
45
+
46
+ ``` sh
47
+ cd parent/dep
48
+ git push origin master
49
+ ```
You can’t perform that action at this time.
0 commit comments