storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/CONTRIBUTING.md (about) 1 # MinIO Contribution Guide [](https://slack.min.io) [](https://hub.docker.com/r/minio/minio/) 2 3 ``MinIO`` community welcomes your contribution. To make the process as seamless as possible, we recommend you read this contribution guide. 4 5 ## Development Workflow 6 7 Start by forking the MinIO GitHub repository, make changes in a branch and then send a pull request. We encourage pull requests to discuss code changes. Here are the steps in details: 8 9 ### Setup your MinIO GitHub Repository 10 Fork [MinIO upstream](https://github.com/minio/minio/fork) source repository to your own personal repository. Copy the URL of your MinIO fork (you will need it for the `git clone` command below). 11 12 ```sh 13 $ git clone https://github.com/minio/minio 14 $ go install -v 15 $ ls /go/bin/minio 16 ``` 17 18 ### Set up git remote as ``upstream`` 19 ```sh 20 $ cd minio 21 $ git remote add upstream https://github.com/minio/minio 22 $ git fetch upstream 23 $ git merge upstream/master 24 ... 25 ``` 26 27 ### Create your feature branch 28 Before making code changes, make sure you create a separate branch for these changes 29 30 ``` 31 $ git checkout -b my-new-feature 32 ``` 33 34 ### Test MinIO server changes 35 After your code changes, make sure 36 37 - To add test cases for the new code. If you have questions about how to do it, please ask on our [Slack](https://slack.min.io) channel. 38 - To run `make verifiers` 39 - To squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request. 40 - To run `make test` and `make build` completes. 41 42 ### Commit changes 43 After verification, commit your changes. This is a [great post](https://chris.beams.io/posts/git-commit/) on how to write useful commit messages 44 45 ``` 46 $ git commit -am 'Add some feature' 47 ``` 48 49 ### Push to the branch 50 Push your locally committed changes to the remote origin (your fork) 51 ``` 52 $ git push origin my-new-feature 53 ``` 54 55 ### Create a Pull Request 56 Pull requests can be created via GitHub. Refer to [this document](https://help.github.com/articles/creating-a-pull-request/) for detailed steps on how to create a pull request. After a Pull Request gets peer reviewed and approved, it will be merged. 57 58 ## FAQs 59 ### How does ``MinIO`` manages dependencies? 60 ``MinIO`` uses `go mod` to manage its dependencies. 61 - Run `go get foo/bar` in the source folder to add the dependency to `go.mod` file. 62 63 To remove a dependency 64 - Edit your code and remove the import reference. 65 - Run `go mod tidy` in the source folder to remove dependency from `go.mod` file. 66 67 ### What are the coding guidelines for MinIO? 68 ``MinIO`` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.min.io).