github.com/psexton/git-lfs@v2.1.1-0.20170517224304-289a18b2bc53+incompatible/CONTRIBUTING.md (about)

     1  ## Contributing to Git Large File Storage
     2  
     3  Hi there! We're thrilled that you'd like to contribute to this project. Your
     4  help is essential for keeping it great.
     5  
     6  This project adheres to the [Open Code of Conduct](./CODE-OF-CONDUCT.md). By participating, you are expected to uphold this code.
     7  
     8  ## Feature Requests
     9  
    10  Feature requests are welcome, but will have a much better chance of being
    11  accepted if they meet the first principles for the project. Git LFS is intended
    12  for end users, not Git experts. It should fit into the standard workflow as
    13  much as possible, and require little client configuration.
    14  
    15  * Large objects are pushed to Git LFS servers during git push.
    16  * Large objects are downloaded during git checkout.
    17  * Git LFS servers are linked to Git remotes by default. Git hosts can support
    18  users without requiring them to set up anything extra. Users can access
    19  different Git LFS servers like they can with different Git remotes.
    20  * Upload and download requests should use the same form of authentication built
    21  into Git: SSH through public keys, and HTTPS through Git credential helpers.
    22  * Git LFS servers use a JSON API designed around progressive enhancement.
    23  Servers can simply host off cloud storage, or implement more efficient methods
    24  of transferring data.
    25  
    26  You can see what the Git LFS team is prioritizing work on in the
    27  [roadmap](./ROADMAP.md).
    28  
    29  ## Project Management
    30  
    31  The Git LFS project is managed completely through this open source project and
    32  its [chat room][chat]. The [roadmap][] shows the high level items that are
    33  prioritized for future work. Suggestions for major features should be submitted
    34  as a pull request that adds a markdown file to `docs/proposals` discussing the
    35  feature. This gives the community time to discuss it before a lot of code has
    36  been written. Roadmap items are linked to one or more Issue task lists ([example][roadmap-items]), with the `roadmap` label, that go into more detail.
    37  
    38  [chat]: https://gitter.im/git-lfs/git-lfs
    39  [roadmap]: ./ROADMAP.md
    40  [roadmap-items]: https://github.com/git-lfs/git-lfs/issues/490
    41  
    42  The Git LFS teams mark issues and pull requests with the following labels:
    43  
    44  * `bug` - An issue describing a bug.
    45  * `core-team` - An issue relating to the governance of the project.
    46  * `enhancement` - An issue for a possible new feature.
    47  * `review` - A pull request ready to be reviewed.
    48  * `release` - A checklist issue showing items marked for an upcoming release.
    49  * `roadmap` - A checklist issue with tasks to fulfill something from the
    50  [roadmap](./ROADMAP.md)
    51  
    52  ## Branching strategy
    53  
    54  In general, contributors should develop on branches based off of `master` and pull requests should be to `master`.
    55  
    56  ## Submitting a pull request
    57  
    58  0. [Fork][] and clone the repository
    59  0. Configure and install the dependencies: `script/bootstrap`
    60  0. Make sure the tests pass on your machine: `script/test`
    61  0. Create a new branch based on `master`: `git checkout -b <my-branch-name> master`
    62  0. Make your change, add tests, and make sure the tests still pass
    63  0. Push to your fork and [submit a pull request][pr] from your branch to `master`
    64  0. Accept the [GitHub CLA][cla]
    65  0. Pat yourself on the back and wait for your pull request to be reviewed
    66  
    67  Here are a few things you can do that will increase the likelihood of your pull request being accepted:
    68  
    69  * Follow the [style guide][style] where possible.
    70  * Write tests.
    71  * Update documentation as necessary.  Commands have [man pages](./docs/man).
    72  * Keep your change as focused as possible. If there are multiple changes you
    73  would like to make that are not dependent upon each other, consider submitting
    74  them as separate pull requests.
    75  * Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
    76  
    77  ## Building
    78  
    79  ### Prerequisites
    80  
    81  Git LFS depends on having a working Go 1.7.3+ environment, with your standard
    82  `$GOROOT` and `$GOPATH` environment variables set.
    83  
    84  On RHEL etc. e.g. Red Hat Enterprise Linux Server release 7.2 (Maipo), you will neet the minimum packages installed to build Git LFS:
    85  
    86  ```
    87  $ sudo yum install gcc
    88  $ sudo yum install perl-Digest-SHA
    89  ```
    90  
    91  In order to run the RPM build `rpm/build_rpms.bsh` you will also need to:
    92  
    93  `$ sudo yum install ruby-devel`
    94  
    95  (note on an AWS instance you may first need to `sudo yum-config-manager --enable rhui-REGION-rhel-server-optional`)
    96  
    97  ### Building Git LFS
    98  
    99  The easiest way to download Git LFS for making changes is `go get`:
   100  
   101      $ go get github.com/git-lfs/git-lfs
   102  
   103  This clones the Git LFS repository to your `$GOPATH`. If you typically keep
   104  your projects in a specific directory, you can symlink it from `$GOPATH`:
   105  
   106      $ cd ~/path/to/your/projects
   107      $ ln -s $GOPATH/src/github.com/git-lfs/git-lfs
   108  
   109  From here, run `script/bootstrap` to build Git LFS in the `./bin` directory.
   110  Before submitting changes, be sure to run the Go tests and the shell integration
   111  tests:
   112  
   113      $ script/test        # runs just the Go tests
   114      $ script/integration # runs the shell tests in ./test
   115      $ script/cibuild     # runs everything, with verbose debug output
   116  
   117  ## Updating 3rd party packages
   118  
   119  0. Update `glide.yaml`.
   120  0. Run `script/vendor` to update the code in the `vendor` directory.
   121  0. Commit the change.  Git LFS vendors the full source code in the repository.
   122  0. Submit a pull request.
   123  
   124  ## Releasing
   125  
   126  If you are the current maintainer:
   127  
   128  * Create a [new draft Release](https://github.com/git-lfs/git-lfs/releases/new).
   129  List any changes with links to related PRs.
   130  * Make sure your local dependencies are up to date: `script/bootstrap`
   131  * Ensure that tests are green: `script/cibuild`
   132  * Bump the version in `lfs/lfs.go`, [like this](https://github.com/git-lfs/git-lfs/commit/dd17828e4a6f2394cbba8621037199dc28f046e8).
   133  * Add the new version to the top of CHANGELOG.md
   134  * Build for all platforms with `script/bootstrap -all` (you need Go setup for
   135  cross compiling with Mac, Linux, FreeBSD, and Windows support).
   136  * Test the command locally.  The compiled version will be in `bin/releases/{os}-{arch}/git-lfs-{version}/git-lfs`
   137  * Get the draft Release ID from the GitHub API: `curl -in https://api.github.com/repos/git-lfs/git-lfs/releases`
   138  * Run `script/release -id {id}` to upload all of the compiled binaries to the
   139  release.
   140  * Publish the Release on GitHub.
   141  * Update [Git LFS website](https://github.com/git-lfs/git-lfs.github.com/blob/gh-pages/_config.yml#L4)
   142  (release engineer access rights required).
   143  * Ping external teams on GitHub:
   144    * @github/desktop
   145  * Build packages:
   146    * rpm
   147    * apt
   148  * Bump homebrew version and generate the homebrew hash with `curl --location https://github.com/git-lfs/git-lfs/archive/vx.y.z.tar.gz | shasum -a 256` ([example](https://github.com/Homebrew/homebrew-core/pull/413/commits/dc0eb1f62514f48f3f5a8d01ad3bea06f78bd566))
   149  * Create release branch for bug fixes, such as `release-1.5`.
   150  * Increment version in `config/version.go` to the next expected version. If
   151  v1.5 just shipped, set the version in master to `1.6-pre`, for example.
   152  
   153  ## Resources
   154  
   155  - [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
   156  - [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
   157  - [GitHub Help](https://help.github.com)
   158  
   159  [fork]: https://github.com/git-lfs/git-lfs/fork
   160  [pr]: https://github.com/git-lfs/git-lfs/compare
   161  [style]: https://github.com/golang/go/wiki/CodeReviewComments
   162  [cla]: https://cla.github.com/git-lfs/git-lfs/accept