-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize packaging docs to match the workflow. (#373)
* Reorganize packaging docs to match the workflow. Add useful links. Clarify wording. Move text blocks to where they make sense in the workflow.# Please enter the commit message for your changes. Lines starting * Update docs/packaging/prepare-for-packaging.mdx Correct spelling of Solus. Co-authored-by: Evan Maddock <[email protected]> * Update docs/packaging/submitting-a-package.md Fixed grammar. Co-authored-by: Evan Maddock <[email protected]> * Update docs/packaging/updating-an-existing-package.md Grammatical fix. Co-authored-by: Evan Maddock <[email protected]> * Update docs/packaging/package.yml.md Clarified wording. Co-authored-by: Evan Maddock <[email protected]> * Update docs/packaging/index.mdx Fixed markdown formatting for the list Co-authored-by: Evan Maddock <[email protected]> * Iprovements after review * Updates and corrections after second review * Re-add MAINTAINERS.md template. Add references in creating and updating steps * Update create package docs with more complete flow. Split off git basics to new file * Logical flow improvements after review. Further improve logical flow of steps in relation to forking. Split git and testing info into separate documents. Make commit info more consistent and applicable to new / updated packages * Wording, link and format fixes after review and yarn lint. Update index. * Workflow and grammatical fixes after review * Further updates after review - Make examples of packaging directory consistent - Grammatical and formatting fixes - Correct workflow details for creating a new package PR - Changed commit template and git commit commands to be consistent with the PR template --------- Co-authored-by: Tracey Clark <[email protected]> Co-authored-by: Evan Maddock <[email protected]>
- Loading branch information
1 parent
910ad84
commit 8c40abb
Showing
27 changed files
with
883 additions
and
413 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,18 @@ | ||
:::note | ||
|
||
The ` --cleanup=scissors` flag is necessary. By default, git treats lines starting with # as a comment, and removes them. | ||
|
||
If you would like to always use this flag without having to type it manually you can do so in one of two ways. | ||
|
||
1. Set an alias in [`~/.gitconfig`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-alias) such as | ||
```bash | ||
cs = commit --cleanup=scissors | ||
``` | ||
You can then use `git cs` which will do the same thing as `git commit --cleanup=scissors`. | ||
|
||
2. Set your git global config to always use the flag. To do so run | ||
```bash | ||
git config --global commit.cleanup scissors | ||
``` | ||
|
||
::: |
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,8 @@ | ||
:::danger | ||
|
||
We are currently in the process of migrating our source repositories from Phabricator to GitHub. If you have any repos checked out from Phabricator, [migrate them](docs/packaging/procedures/migrate-repos-to-github.md) before proceeding. | ||
|
||
Updating all facets of the documentation will take some time. | ||
If you notice any issues feel free to [file an issue](https://github.com/getsolus/help-center-docs/issues/new) on our docs tracker, or get in contact with us on our [Matrix](/docs/user/contributing/getting-involved#matrix-chat) channels. | ||
|
||
::: |
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,6 @@ | ||
{ | ||
"label": "Advanced Configuration", | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
File renamed without changes.
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
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
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,57 @@ | ||
--- | ||
title: Git Basics | ||
summary: Basic git commands for packaging | ||
--- | ||
|
||
# Git Basics | ||
|
||
## Working with branches | ||
|
||
The recommended way to switch branches is `git switch`. | ||
To create a new branch use `git switch -c`. | ||
|
||
## Keeping your branch up to date with the master branch | ||
|
||
If there any new changes to the repository whilst you are still working on your branch you need to [sync your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork). | ||
Run `git fetch`, and `git rebase origin/master` to pull the changes in. | ||
You will need to fix any conflicts manually. | ||
You can check your branch against master with `git diff origin/master..my-branch`. | ||
|
||
## Adding files | ||
|
||
For every file you change or add, you must let git know about it: `git add someFile` | ||
|
||
## Removing files | ||
|
||
For files that need to be removed, you must do so using git: `git rm someFile` | ||
|
||
## Renaming files | ||
|
||
Likewise, for renaming a file, you must do so via git: `git mv someFile someFileName2` | ||
|
||
## Check the changes in your files | ||
|
||
It's a good idea to review the changes you have made to each file. This is to make sure you're committing what you intend and to make sure it looks good. Do this before adding changed files. | ||
|
||
To diff them all at once, useful for small changes, use `git diff`. | ||
To diff each file one at a time run `git diff filename` on each one. | ||
|
||
## Commit your changes | ||
|
||
**Check your branch** | ||
|
||
Get the status of the branch with `git status`. Make sure all the files you changed are staged, and that there are no untracked files. The git status should say your branch is clean. | ||
|
||
Now that you've tested and reviewed your change, when you're happy with it, it's time to commit your changes with `git commit`. | ||
|
||
## Deleting your branch after a pull request is merged | ||
|
||
Once your pull request has been accepted you can delete your working branches. | ||
First, change to the package directory, switch to the master branch, then delete your local and the remote branches. | ||
|
||
```bash | ||
cd ~/solus-builds/package | ||
git switch master | ||
git branch -D my-branch | ||
git push -d origin my-branch | ||
``` |
Oops, something went wrong.