@@ -56,6 +56,69 @@ Edit `composer.json` and
5656
5757 composer update --prefer-dist tsugi/lib
5858
59+ Making Changes and Contributing Back
60+ -------------------------------------
61+
62+ This ` tsugi/lib ` directory is a git subtree that tracks the upstream repository
63+ at [ tsugiproject/tsugi-php] ( https://github.com/tsugiproject/tsugi-php ) . When you
64+ make changes to files in this subtree, you can push those changes back to the
65+ original repository as a pull request.
66+
67+ ### Workflow for Contributing Changes
68+
69+ 1 . ** Make your changes** in the ` tsugi/lib ` directory as you normally would.
70+
71+ 2 . ** Commit your changes** in the parent repository:
72+
73+ git add tsugi/lib
74+ git commit -m "Your commit message describing the changes"
75+
76+ 3 . ** Push changes back to the upstream repository** :
77+
78+ First, ensure you have the upstream repository configured as a remote:
79+
80+ git remote add tsugi-php https://github.com/tsugiproject/tsugi-php.git
81+
82+ Then push the subtree changes to a branch in the upstream repository:
83+
84+ git subtree push --prefix=tsugi/lib tsugi-php your-branch-name
85+
86+ This will create a new branch ` your-branch-name ` in the upstream repository
87+ with your changes.
88+
89+ 4 . ** Create a Pull Request** :
90+
91+ - Navigate to https://github.com/tsugiproject/tsugi-php
92+ - You should see a banner suggesting to create a PR from your new branch
93+ - Click "Compare & pull request" and fill out the PR description
94+ - Submit the PR for review
95+
96+ ### Alternative: Using a Fork
97+
98+ If you prefer to work with a fork of the upstream repository:
99+
100+ 1 . ** Fork the repository** at https://github.com/tsugiproject/tsugi-php
101+
102+ 2 . ** Add your fork as a remote** :
103+
104+ git remote add tsugi-php-fork https://github.com/YOUR-USERNAME/tsugi-php.git
105+
106+ 3 . ** Push to your fork** :
107+
108+ git subtree push --prefix=tsugi/lib tsugi-php-fork your-branch-name
109+
110+ 4 . ** Create a PR** from your fork's branch to the upstream repository.
111+
112+ ### Notes
113+
114+ - The ` git subtree push ` command extracts only the commits that affect files
115+ in the ` tsugi/lib ` directory and creates a clean history in the upstream
116+ repository.
117+ - Make sure your commit messages are clear and descriptive, as they will be
118+ preserved in the upstream repository.
119+ - If you encounter conflicts during the push, you may need to pull the latest
120+ changes from upstream first using ` git subtree pull ` .
121+
59122Releasing
60123---------
61124
0 commit comments