workflow
These instructions assume that you already have a github account and have installed Git as well. Make sure that git is in your PATH by executing the command git in any terminal or cmd and checking that it doesn’t output an error such as “command not found”. If you don’t have git installed, follow these instructions.
🔗Authenticate Github
Follow the instructions for GitHub CLI at https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git
This will ensure that you have your keys and credentials setup correctly.
🔗Documenting undocumented features
We are particularly interested in documenting closed pull requests that require new or changes to this manual. Pull requests that require documentation are cataloged with a GitHub label documentation-pending.
The high-level steps to do this are:
- View the list of Pull Requests that need documentation.
- Select a Pull Request where you understand what has changed.
- Author the change as detailed in the workflow below.
- When you make the Pull Request, include the a link to the pull request from Step 1.
🔗The documentation workflow
🔗One-time setup
Perform the follwing steps once on your computer to preprase it for working with the documentation. If you already have GitHub SSH keys setup, you do not need to set them up again.
- Go to
https://github.com/darktable-org/dtdocs - Press the
Forkbutton and then theCreate forkbutton - You will be redirected to a page with your fork of darktable documentation. Press the
Codebutton and copy the link under HTTPS. - Open a terminal or cmd in your desired directory where the darktable documentation repository will reside. Something like ‘C:\Users\YourUser\Documents' or ‘/home/youruser/Documents/builds’. Both on windows and macOS/Linux you can use the following command to travel to your desired directory:
cd C:\Users\YourUser\Documents\replacing the example directory for yours. - Pull the darktable repository by executing:
git clone https://github.com/<your username>/dtdocs.gitChange the URL for the one you copied on step 3. - Now you have a copy of the darktable repository on your PC
🔗Syncing changes
- Go to your repositories on github and select your darktable fork
- Press the
Sync fork - Open a terminal or cmd in your darktable repository directory
- Assure you have no pending changes by executing
git statusand then executegit checkout master - Execute
git pull
🔗Branch and edit
- Open a terminal or cmd in your darktable documentation repository directory
- Execute
git pull origin masterto get the latest changes from GitHub. - Execute
git checkout -b branch-namechangebranch-namefor your desired branch name. This is often related to the work you’re doing. For example for this PR https://github.com/darktable-org/darktable/pull/17589 you could call itdt-synch-edit-docs. - Do the documentation work
- Verify your changed files with
git status. If you have more files modified than the ones you intend to submit, you can dogit restore path/to/file/do revert your changes. - Execute
git add -a. This will stage all changed files. - Execute
git commit -m "Added documentation for yada yada". Inside the "" you will put a small message about the work you did - Execute
git push --set-upstream origin branch-nameChanging the branch name by the one you picked before - Create your pull request by following the instructions bellow.
- If you need to make changes, simply repeat 3-7. For the command in step 2 you can omit
-band in step 7 you can just dogit push. - After you are done and your pull request is merged or you are finished with your work for this specific pull request, execute
git checkout masterto return to the master branch. I recommend working on only one branch/pr at a time if you don’t know how git works.
🔗Pull request
- Go to https://github.com/darktable-org/dtdocs/compare
- Press
compare across forks. Select your repository, and then the branch you just worked on. - Press
Create Pull Request