Debian Codegraph @

docs/misc/migrate-from-submodule.md

raw
1 **WARNING**
2
3 Only do the following if you are using dotdrop version `< 0.7.1` or if you encounter an issue when running dotdrop that redirects you here.
4
5 ---
6
7 Initially dotdrop was only available as a submodule directly in the
8 dotfiles git tree. When updated to work with PyPI, some code changed
9 that brought some issues to older versions.
10
11 If you want to keep it as a submodule (recommended), simply do the following:
12 ```bash
13 $ cd <dotfiles-directory>
14
15 ## get latest version of the submodule
16 $ git submodule foreach git pull origin master
17
18 ## and stage the changes
19 $ git add dotdrop
20 $ git commit -m 'update dotdrop'
21
22 ## update the bash script wrapper
23 $ ./dotdrop/bootstrap.sh
24
25 ## and stage the change to the dotdrop.sh script
26 $ git add dotdrop.sh
27 $ git commit -m 'update dotdrop.sh'
28
29 ## and finally push the changes upstream
30 $ git push
31 ```
32
33 Otherwise, simply install it from PyPI as shown below:
34
35 * Move to the dotfiles directory where dotdrop is used as a submodule
36 ```bash
37 $ cd <dotfiles-repository>
38 ```
39 * Remove the entire `submodule "dotdrop"` section in `.gitmodules`
40 * Stage the changes
41 ```bash
42 $ git add .gitmodules
43 ```
44 * Remove the entire `submodule "dotdrop"` section in `.git/config`
45 * Remove the submodule
46 ```bash
47 $ git rm --cached dotdrop
48 ```
49 * Remove the submodule from .git
50 ```bash
51 $ rm -rf .git/modules/dotdrop
52 ```
53 * Commit the changes
54 ```bash
55 $ git commit -m 'removing dotdrop submodule'
56 ```
57 * Remove any remaining files from the dotdrop submodule
58 ```bash
59 $ rm -rf dotdrop
60 ```
61 * Remove `dotdrop.sh`
62 ```bash
63 $ git rm dotdrop.sh
64 $ git commit -m 'remove dotdrop.sh script'
65 ```
66 * Push upstream
67 ```bash
68 $ git push
69 ```