-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: git contributing guide (#1892)
Signed-off-by: Meg McRoberts <meg.mcroberts@dynatrace.com>
- Loading branch information
1 parent
124e243
commit 30393c6
Showing
7 changed files
with
407 additions
and
279 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
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,22 @@ | ||
--- | ||
title: Working with Git | ||
description: Using Git to contribute software and docs | ||
weight: 200 | ||
--- | ||
|
||
Keptn source for software and documentation is stored in the | ||
[Keptn lifecycle-toolkit repository](https://github.com/keptn/lifecycle-toolkit). | ||
Contributions are made using standard Git practices. | ||
This section describes the basic steps required to contribute using Git | ||
and summarizes some standard practices we use with Keptn. | ||
|
||
You can also modify the source using the GitHub editor. | ||
This is very useful when you want to fix a typo | ||
or make some other small change | ||
although be sure so include the DCO signoff. | ||
|
||
If you are doing significant work, | ||
you should fork and clone your own copy of the repository, | ||
make your changes in a local branch, | ||
then push those changes to github where they can be reviewed | ||
and ultimately merged into the product. |
52 changes: 52 additions & 0 deletions
52
docs/content/en/contribute/general/git/branch-create/_index.md
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,52 @@ | ||
--- | ||
title: Create local branch | ||
description: How to create a local branch and make modifications in it | ||
weight: 30 | ||
--- | ||
|
||
After you | ||
[fork and clone](../fork-clone) | ||
the Keptn repository and set `upstream` in your local machine, | ||
you need to create a local branch where you will make your changes. | ||
|
||
## Create a new branch and make your changes | ||
|
||
Be sure that your branch is based on and sync'ed with `main`, | ||
unless you intend to create a derivative PR. | ||
The following sequence of commands does that: | ||
|
||
```console | ||
git checkout main | ||
git pull upstream main | ||
git push origin main | ||
git checkout -b <my-new-branch> | ||
``` | ||
|
||
Execute the following and check the output | ||
to ensure that your branch is set up correctly: | ||
|
||
```console | ||
git status | ||
``` | ||
|
||
Now you can make your changes, build and test them locally, | ||
then create a PR to add these changes to the documentation set. | ||
|
||
* For documentation changes: | ||
* Do the writing you want to do in your local branch | ||
* Check the formatted version in your IDE | ||
or at `localhost:1314/docs-dev` | ||
to ensure that it is rendering correctly | ||
and that all links are valid.. | ||
See [Build Documentation Locally](../../../docs/local-building) | ||
for more information. | ||
* Run `make markdownlint-fix` to check and fix the markdown code. | ||
|
||
* For software changes: | ||
* Create the new code in your local branch. | ||
* Create and run unit tests for your new code. | ||
* Run other appropriate test to ensure that your code works correctly. | ||
|
||
When you have completed the checking and testing of your work, | ||
it is time to push your changes and create a PR that can be reviewed. | ||
See [Create PR](../pr-create) for details. |
Oops, something went wrong.