-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xpadneo: Add documentation about testing pull requests
Forks used for pull requests should not have tags. This is a problem for our installer. To properly work with forks, these should be added as a git remote instead. To still get the benefits of isolated directories, git worktrees can be used instead. Place a hint in the installer if this problem may occur, and also add some documentation on how to use these features of git. Signed-off-by: Kai Krakow <[email protected]>
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## Testing and Development | ||
|
||
### Working with Pull Requests | ||
|
||
If working with pull requests, do not clone a fork of the other repository. | ||
The installer needs the original version tags to properly work and to have | ||
correct version tags that have not been tampered with. | ||
|
||
It is always recommended to add additional remotes for the forks to your | ||
already existing local clone. | ||
|
||
To do this, follow these steps. This example uses kakra/xpadneo as a fork: | ||
```bash | ||
# checkout a clone from the original repository | ||
git clone https://github.com/atar-axis/xpadneo.git | ||
cd xpadneo | ||
|
||
# add the fork for the pull request as a clone | ||
git remote add kakra https://github.com/kakra/xpadneo.git | ||
git remote update | ||
|
||
# option 1: switch to another branch within this directory | ||
git switch -C local/branch/name kakra/remote/branch/name | ||
|
||
# option 2: setup a git workdir to use an isolated directory | ||
git worktree add ../xpadneo-kakra -B local/branch/name kakra/remote/branch/name | ||
|
||
# to update to the latest version of a pull request | ||
git remote update --prune | ||
|
||
# then reset your outdated copy of the branch | ||
git reset --merge kakra/remote/branch/name # tries keeping your local modifications | ||
git reset --hard kakra/remote/branch/name # discards your local modifications | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters