File: migrate-from-submodule.md

package info (click to toggle)
dotdrop 1.15.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,812 kB
  • sloc: sh: 13,401; python: 8,186; makefile: 3
file content (69 lines) | stat: -rw-r--r-- 1,630 bytes parent folder | download | duplicates (3)
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
**WARNING**

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.

---

Initially dotdrop was only available as a submodule directly in the
dotfiles git tree. When updated to work with PyPI, some code changed
that brought some issues to older versions.

If you want to keep it as a submodule (recommended), simply do the following:
```bash
$ cd <dotfiles-directory>

## get latest version of the submodule
$ git submodule foreach git pull origin master

## and stage the changes
$ git add dotdrop
$ git commit -m 'update dotdrop'

## update the bash script wrapper
$ ./dotdrop/bootstrap.sh

## and stage the change to the dotdrop.sh script
$ git add dotdrop.sh
$ git commit -m 'update dotdrop.sh'

## and finally push the changes upstream
$ git push
```

Otherwise, simply install it from PyPI as shown below:

* Move to the dotfiles directory where dotdrop is used as a submodule
```bash
$ cd <dotfiles-repository>
```
* Remove the entire `submodule "dotdrop"` section in `.gitmodules`
* Stage the changes
```bash
$ git add .gitmodules
```
* Remove the entire `submodule "dotdrop"` section in `.git/config`
* Remove the submodule
```bash
$ git rm --cached dotdrop
```
* Remove the submodule from .git
```bash
$ rm -rf .git/modules/dotdrop
```
* Commit the changes
```bash
$ git commit -m 'removing dotdrop submodule'
```
* Remove any remaining files from the dotdrop submodule
```bash
$ rm -rf dotdrop
```
* Remove `dotdrop.sh`
```bash
$ git rm dotdrop.sh
$ git commit -m 'remove dotdrop.sh script'
```
* Push upstream
```bash
$ git push
```