github.com/vmware/go-vmware-nsxt@v0.0.0-20230223012718-d31b8a1ca05e/CONTRIBUTING.md (about) 1 # Contributing to go-vmware-nsxt 2 3 The go-vmware-nsxt project team welcomes contributions from the community. Before you start working with go-vmware-nsxt, please read our [Developer Certificate of Origin](https://cla.vmware.com/dco). All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch. 4 5 ## Contribution Flow 6 7 This is a rough outline of what a contributor's workflow looks like: 8 9 - Create a topic branch from where you want to base your work 10 - Make commits of logical units 11 - Make sure your commit messages are in the proper format (see below) 12 - Push your changes to a topic branch in your fork of the repository 13 - Submit a pull request 14 15 Example: 16 17 ``` shell 18 git remote add upstream https://github.com/vmware/go-vmware-nsxt.git 19 git checkout -b my-new-feature master 20 git commit -a 21 git push origin my-new-feature 22 ``` 23 24 ### Staying In Sync With Upstream 25 26 When your branch gets out of sync with the vmware/master branch, use the following to update: 27 28 ``` shell 29 git checkout my-new-feature 30 git fetch -a 31 git pull --rebase upstream master 32 git push --force-with-lease origin my-new-feature 33 ``` 34 35 ### Updating pull requests 36 37 If your PR fails to pass CI or needs changes based on code review, you'll most likely want to squash these changes into 38 existing commits. 39 40 If your pull request contains a single commit or your changes are related to the most recent commit, you can simply 41 amend the commit. 42 43 ``` shell 44 git add . 45 git commit --amend 46 git push --force-with-lease origin my-new-feature 47 ``` 48 49 If you need to squash changes into an earlier commit, you can use: 50 51 ``` shell 52 git add . 53 git commit --fixup <commit> 54 git rebase -i --autosquash master 55 git push --force-with-lease origin my-new-feature 56 ``` 57 58 Be sure to add a comment to the PR indicating your new changes are ready to review, as GitHub does not generate a 59 notification when you git push. 60 61 ### Code Style 62 63 Please run "go gmt" on all go source files before submitting. 64 65 ### Formatting Commit Messages 66 67 We follow the conventions on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/). 68 69 Be sure to include any related GitHub issue references in the commit message. See 70 [GFM syntax](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) for referencing issues 71 and commits. 72 73 ## Reporting Bugs and Creating Issues 74 75 When opening a new issue, try to roughly follow the commit message format conventions above.