Developer Documentation - todotxt/todo.txt-cli GitHub Wiki

To contribute to Todo.txt CLI, fork the repository and make your changes, including tests. Then issue a pull request via GitHub to submit your changes for review and possible inclusion in the master. New features, big or disruptive changes should be discussed first.

Contributing patches and enhancements via Git / GitHub

Initial Fork

You need to register on GitHub first - it's free and quick to do. After registering, you need to add your SSH public keys to be able to push your changes to your repository. On the Todo.txt GitHub pages, click the Fork this project button. This will create your personal fork [email protected]:username/projectname.git.

On your dev system, install Git and clone your repository:

$ git clone [email protected]:username/todo.txt-cli.git

We'll add the organization's authoritative repository as upstream, so that you can easily sync with it:

$ git remote add upstream git://github.com/todotxt/todo.txt-cli.git
$ git fetch upstream

Run Tests

$ make test

See also the README in the tests directory for more.

Publishing Changes

$ git add ...
$ git commit ...
$ git push origin master

The changes now appear in your repository in your GitHub clone; you'll see the commits listed in the GitHub web interface. You can now initiate a pull request by clicking the Pull Request button. Send the request to the maintainers. You will receive a message (in GitHub and via Email) when she has merged in your changes; or just occasionally check the changelog.

Pulling in Upstream

Some time has passed, the upstream repo has changed and you want to update your fork before you submit a new patch. Do this to bring your dev system up-to-date:

$ git fetch upstream
$ git merge upstream/master

Packaging a Distribution

  1. Create a branch release/v9.99.9 from the master branch.
  2. Documentation: Update the changelog with changes since previous release

Make sure all changes are committed, and tag the current state of the repo, then create the distribution archives:

$ git tag -a v9.99.9 -m 'Version 9.99.9'
$ rm VERSION-FILE
$ make disttest
$ make dist
  1. Create a PR, and fast-forward merge it into the master branch. Attention! A |Rebase| merge is not sufficient; apparently GitHub rebases the single commit even if it's even with the master branch!
$ git push upstream refs/tags/v9.99.9
  1. Browse to the new tag in GitHub, and create a new release off of it. Title is v9.99.9, and the body is the changelog since the previous release. You don't need to copy the link references, as GitHub auto-links the #999 issue and PR numbers.
  2. Drag the two release artifacts (todo.txt_cli-9.99.9.{tar.gz,zip}) into the release page, and publish the release.