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.
🔗Documenting undocumented features
We are particularly interested in documenting closed pull requests that require additions 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 a link to the pull request from Step 1.
🔗The documentation workflow
🔗One-time setup
If you have not already configured git locally, use these two commands to configure your identity before committing:
git config --global user.email "you@example.com"git config --global user.name "Your Name"
And if you have not yet authenticated your local git instance with github, follow the instructions for GitHub CLI here. This will ensure that you have your keys and credentials set up correctly.
Then you can clone a copy of dtdocs to your computer.
- 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 the 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 navigate to your desired directory:
cd C:\Users\YourUser\Documents\replacing the example directory for yours. - Clone the dtdocs repository by executing:
git clone https://github.com/<your username>/dtdocs.gitChange the URL to the one you copied in step 3. - Now you have a copy of the dtdocs repository on your PC. Some further setup will follow before you can start editing files.
🔗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.
- Ensure you have no local pending changes by executing
git statusand then executegit checkout master(if you followed this guide for the first time you will already be on master). - Execute
git pull(this ensures your local copy is up to date with your fork on github).
Alternatively you can sync your fork and local copy via terminal:
- Ensure you have no local pending changes by executing
git statusand then executegit checkout master. - Check your remote repositories:
git remote -v. You should at least seeorigin(your fork). Ifupstreamis missing, add it in the next step. - Add the dtdocs repository as upstream (only once):
git remote add upstream https://github.com/darktable-org/dtdocs.git. - Pull the current state from the main repository to your local copy:
git pull upstream master. - Push your now synced local copy to your fork:
git push origin master.
🔗Branch, edit and create a pull request
- 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/to 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-nameReplace branch-name with the one you picked earlier. - Create your pull request by following the instructions below.
- If you need to make further corrections using the current branch, simply repeat 3-8. For the command in step 3 you can omit
-band in step 8 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