dev:starting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:starting [2019/03/05 13:12] – [Prepare the patch] alazzaro | dev:starting [2019/06/22 16:16] – oschuett | ||
---|---|---|---|
Line 4: | Line 4: | ||
Documentation improvements, | Documentation improvements, | ||
- | CP2K is a large project, there is no way to study the full code, and start when that is done! Start working on small patches first, that are easy to code, to test and to integrate. Small patches are easier to review and thus will be more quickly merged to the Git master branch. As experience with the code grows, tackling larger projects becomes realistic. Developers | + | CP2K is a large project, there is no way to study the full code, and start when that is done! Start working on small patches first, that are easy to code, to test and to integrate. Small patches are easier to review and thus will be more quickly merged to the Git master branch. As experience with the code grows, tackling larger projects becomes realistic. Developers |
===== Prepare the patch ===== | ===== Prepare the patch ===== | ||
- Fork the CP2K Repository on GitHub via " | - Fork the CP2K Repository on GitHub via " | ||
- | | + | |
- | - On your machine, clone the repository via **git clone --recursive https:// | + | - On your machine, clone the repository via **git clone %%--%%recursive https:// |
- Move to the downloaded cp2k directory: **cd cp2k** | - Move to the downloaded cp2k directory: **cd cp2k** | ||
- Start working in a new branch: **git checkout -b my-new-feature** | - Start working in a new branch: **git checkout -b my-new-feature** | ||
Line 15: | Line 15: | ||
- Add new and changed files: **git add ...** | - Add new and changed files: **git add ...** | ||
- Commit the changes: **git commit** | - Commit the changes: **git commit** | ||
- | - Please follow the [[https:// | + | - Please follow the [[https:// |
- Do the first push to your fork, give the remote branch the same name as the local one: **git push -u origin my-new-feature** | - Do the first push to your fork, give the remote branch the same name as the local one: **git push -u origin my-new-feature** | ||
- Do some more work, then repeat point 6. and 7. | - Do some more work, then repeat point 6. and 7. | ||
Line 22: | Line 22: | ||
- tell your local git repository once about the remote: **git remote add upstream https:// | - tell your local git repository once about the remote: **git remote add upstream https:// | ||
- make sure you are on the right branch: **git checkout master** | - make sure you are on the right branch: **git checkout master** | ||
- | - rebase' | + | |
- push the changes: **git push** | - push the changes: **git push** | ||
- You can also rebase your feature branch, in this case do the previous point and then: | - You can also rebase your feature branch, in this case do the previous point and then: | ||
- **git checkout my-new-feature** | - **git checkout my-new-feature** | ||
- | - **git pull --rebase upstream master**, this may generate rebase/ | + | - **git pull %%--%%rebase upstream master**, this may generate rebase/ |
- | | + | |
===== Submit the patch ===== | ===== Submit the patch ===== | ||
Line 45: | Line 45: | ||
- Are proper citations added the bibliography ? | - Are proper citations added the bibliography ? | ||
- if any of the above steps required changes to the code, go back to the first step, otherwise go to the next step. | - if any of the above steps required changes to the code, go back to the first step, otherwise go to the next step. | ||
- | - the main process | + | - go to https:// |
- | - we use **git rebase** to keep the [[https:// | + | - you can check the status of your PR at https:// |
+ | - we use 'rebase' | ||
+ | - the PR will trigger the [[https:// | ||
+ | - In the case of success, the PR will be merged by one of the CP2K administrators | ||
+ | - In the case of error, please check what's wrong in the CI logs, fix it in your branch, and commit/push again. The CI will automatically rerun on the new version of the code (no need to close the PR, it will be automatically updated!). Repeat until the CI runs fine. | ||
+ |
dev/starting.txt · Last modified: 2022/12/16 09:27 by krack