diff options
Diffstat (limited to 'docs/content/doc/advanced/hacking-on-gitea.en-us.md')
-rw-r--r-- | docs/content/doc/advanced/hacking-on-gitea.en-us.md | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/docs/content/doc/advanced/hacking-on-gitea.en-us.md b/docs/content/doc/advanced/hacking-on-gitea.en-us.md index 368d174491..469c5a5021 100644 --- a/docs/content/doc/advanced/hacking-on-gitea.en-us.md +++ b/docs/content/doc/advanced/hacking-on-gitea.en-us.md @@ -15,21 +15,28 @@ menu: # Hacking on Gitea -We won't cover the basics of a Golang setup within this guide. If you don't know how to get the environment up and running you should follow the official [install instructions](https://golang.org/doc/install). +Familiarity with the existing [installation instructions](https://golang.org/doc/install) +is required for this section. -If you want to contribute to Gitea you should fork the project and work on the `master` branch. There is a catch though, some internal packages are referenced by their GitHub URL. So you have to trick the Go tool to think that you work on a clone of the official repository. Start by downloading the source code as you normally would: +To contribute to Gitea, fork the project and work on the `master` branch. + +Some internal packages are referenced using their respective Github URL. This can +become problematic. To "trick" the Go tool into thinking this is a clone from the +official repository, download the source code using "go get" and follow these instructions. ``` go get -d code.gitea.io/gitea ``` -Now it's time to fork the [Gitea repository](https://github.com/go-gitea/gitea) on GitHub, after that you should have to switch to the source directory on the command line: +Fork the [Gitea repository](https://github.com/go-gitea/gitea) on GitHub, it should +then be possible to switch the source directory on the command line. ``` cd $GOPATH/src/code.gitea.io/gitea ``` -To be able to create pull requests you should add your forked repository as a remote to the Gitea sources, otherwise you can not apply the changes to our repository because of lacking write permissions: +To be able to create pull requests, the forked repository should be added as a remote +to the Gitea sources, otherwise changes can't be pushed. ``` git remote rename origin upstream @@ -37,6 +44,12 @@ git remote add origin git@github.com:<USERNAME>/gitea.git git fetch --all --prune ``` -You've got a working development environment for Gitea now. Take a look at the `Makefile` to get an overview about the available tasks. The most common tasks should be `make test` which will start our test environment and `make build` which will build a `gitea` binary into your working directory. Writing test cases is not mandatory to contribute, but we will be happy if you do. +This should provide a working development environment for Gitea. Take a look at +the `Makefile` to get an overview about the available tasks. The most common tasks +should be `make test` which will start our test environment and `make build` which +will build a `gitea` binary into the working directory. Writing test cases is not +mandatory to contribute, but it is highly encouraged and helps developers sleep +at night. -That’s it! You are ready to hack on Gitea. Test your changes, push them to your repository and open a pull request. +That's it! You are ready to hack on Gitea. Test changes, push them to the repository, +and open a pull request. |