File: README.md

package info (click to toggle)
librecast 0.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,760 kB
  • sloc: ansic: 31,144; asm: 28,570; sh: 3,164; makefile: 713; python: 70
file content (47 lines) | stat: -rw-r--r-- 1,347 bytes parent folder | download | duplicates (2)
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
# README - libs

libmld is merged as a subtree. See
[https://nuclearsquid.com/writings/subtree-merging-and-you/]
and
[https://www.atlassian.com/git/tutorials/git-subtree]

## Updating libmld

To start from a fresh clone:

```
git clone git@codeberg.org:librecast/librecast.git
cd librecast
git remote add -f libmld git@codeberg.org:librecast/libmld.git
git pull -s subtree libmld main
```

Once the remote is set up, to update:

`git subtree pull --prefix libs/libmld libmld main --squash`

This will create a squashed commit with a commit message listing the new upstream commits + a merge commit.

NB: if local commits to the subtree have been made and pushed back upstream,
doing this will try to pull these commits in again, resulting in conflicts. This
can be avoided by editing the local commit and adding something like:

```
git-subtree-dir: libs/libmld
git-subtree-split: dc7d0af181fb954b2a9a313a9e65c9729b2e5cc4
```
where git-subtree-split points to the upstream commit hash.

## Pushing a local change to libmld back upstream

`git subtree push --prefix=libs/libmld libmld main`

## subtree split

The exact history of the subtree can be split out again, and all commit hashes
will match the subproject.

`git subtree split -P libs/libmld`

This will output a single commit hash, which will be the latest commit in the
subtree project.