Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit a0696fc

Browse files
committed
add skeleton repo process docs
1 parent 7d999aa commit a0696fc

File tree

4 files changed

+84
-39
lines changed

4 files changed

+84
-39
lines changed

CONTRIBUTING.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ are two sorts of contributions:
77
- Changes to the skeleton structure should be made on a branch
88
of the skeleton-repo_ with a PR
99
raised back to the ``main`` branch from here: PR_.
10+
see `Skeleton` for more details.
1011
- Changes to the docs or commandline tool should be made on a branch in
1112
the cli-repo_ with with a PR raised back to the ``main`` branch
1213
here: PR2_
@@ -145,6 +146,7 @@ When this happens:
145146
- Choose ``Draft New Release``
146147
- Click ``Choose Tag`` and supply the new tag you chose (click create new tag)
147148
- Click ``Generate release notes``, review and edit these notes
149+
- If this is a pre-release then check the ``This is a pre-release`` check-box.
148150
- Choose a title and click ``Publish Release``
149151

150152
Note that tagging and pushing to the main branch has the same effect except that

docs/explanations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ Explanation of how the library works and why it works that way.
1111
explanations/why-use-skeleton
1212
explanations/why-src
1313
explanations/why-pre-commit
14-
explanations/features
1514
explanations/decisions
15+
explanations/skeleton

docs/explanations/features.rst

Lines changed: 0 additions & 38 deletions
This file was deleted.

docs/explanations/skeleton.rst

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.. _Skeleton:
2+
3+
Working on the Skeleton Repo
4+
============================
5+
6+
The python3-pip-skeleton_ repo has a protected main branch and is restricted to
7+
rebase PRs only.
8+
It is also squashed occasionally so some careful procedures are required.
9+
10+
.. _python3-pip-skeleton: https://github.com/epics-containers/python3-pip-skeleton
11+
12+
main
13+
----
14+
15+
This branch is what all adopters of the skeleton project merge from so needs
16+
to be kept tidy.
17+
In particular it must not have any #nnn which would refer to the wrong commit
18+
when merged into other repos (and github will see them and add incorrect
19+
messages in PRs and Issues). This branch is protected from push and
20+
restricted so that it can only be updated by a PR with REBASE.
21+
22+
dev-archive
23+
-----------
24+
This branch to tracks all commits, including those that are squashed out of
25+
main. Force push is disallowed on this branch so that it can be kept as a
26+
safe record of the history.
27+
28+
Process for making a change
29+
---------------------------
30+
To make changes. First take a new branch off of main, make your changes
31+
and do a pull request to rebase main on the branch.
32+
33+
- get a branch on main
34+
35+
- git checkout main
36+
- git reset --hard origin/main # because main may have been rebased
37+
- git checkout -b feature
38+
- Do the changes and test in CI with:
39+
40+
- git add --all
41+
- git commit -m'my changes'
42+
- git push -u origin feature
43+
- When happy with changes use PR to rebase main on feature.
44+
- Next delete feature:
45+
46+
- git push origin :feature
47+
- git checkout main
48+
- git branch -fd feature
49+
50+
51+
Process for squashing main
52+
--------------------------
53+
54+
Once a year or so tidy up the history of main to make new adoptions easy.
55+
Otherwise multiple changes to the same line in the history may cause multiple
56+
merge conflicts on that line during re-merge of skeleton into projects
57+
that have already adopted.
58+
59+
Perform these steps
60+
61+
- Get the dev-archive branch to remember your main commits
62+
63+
- git checkout dev-archive
64+
- git merge main
65+
- If there are conflicts
66+
67+
- git checkout --theirs
68+
- git add --all
69+
- git commit # the commit message will be 'merged ...' you can
70+
add to it if needed
71+
- Now squash main right back to the original ededf000
72+
- git checkout main
73+
- git reset --hard /origin/main
74+
- git rebase -i ededf000
75+
- In the rebase edit screen replace all ``pick`` with ``s`` except the first
76+
one. save and quit
77+
- Now create a handoff branch
78+
- git checkout dev-archive
79+
- git checkout -b handoff/202x-xx-xx
80+
- git merge main
81+
- git push -u origin handoff/202x-xx-xx

0 commit comments

Comments
 (0)