How To Contribute
This project is based on GitHub and can be accessed by clicking here.
Here are the basic of contributing to GitHub:
- Fork and clone the project
- Set up the project locally
- Create an upstream remote and sync your local copy
- Branch each set of work
- Push the work to your own repository
- Create a new pull request
- Look out for any code feedback and respond accordingly
This book was built from ground-up in a collaborative fashion using a small set of Open Source tools and technologies.
Collaboration relies on Git - a free and open source distributed version control system and other tools around Git:
- Gogs - Go Git Service, a painless self-hosted Git Service, which provides a Github like user interface and workflow
- Git Flow - a collection of Git extensions to provide high-level repository operations for Vincent Driessen's branching model
- Git Flow Hooks - some useful hooks for git-flow (AVH Edition) by Jaspern Brouwer
The book sources are written on the markdown format, taking advantage of gitbook-cli.
Environment Setup
If you want to contribute to this book, you should first setup the following tools on your system:
- To install Git, please follow the official instructions according to your system's configuration
- Now that you have Git, you should install Git Flow and Git Flow Hooks
- Last but not least, setup GitBook CLI
How To Start
Ok, now you're ready to contribute.
Fork the js-scp
repo and then clone your own repository.
The next step is enabling Git Flow hooks; enter your local repository
$ cd js-scp
and run
$ git flow init
We're good to go with the Git Flow default values.
In a nutshell, every time you want to work on a section, you should start a 'feature':
$ git flow feature start my-new-section
To keep your work safe, don't forget to publish your feature:
$ git flow feature publish
Once you're ready to merge your work with others, you should go to the main
repository and open a Pull Request to the develop
branch. Then, someone
will review your work, leave any comments, request changes and/or simply merge
it on branch develop
of project's main repository.
As soon as this happens, you'll need to pull the develop
branch to keep your
own develop
branch updated with the upstream. The same way as on a release,
you should update your master
branch.
When you find a typo or something that needs to be fixed, you should start a 'hotfix'.
$ git flow hotfix start
This will apply your change on both develop
and master
branches.
As you can see, until now there were no commits to the master
branch. Great!
This is reserved for releases
- when the work is ready to become publicly
available, the project owner will do the release.
While in the development stage, you can get a live preview of your work. To get the Git Book tracking file changes and to live-preview your work, you just need to run the following command on a shell session
$ npm run serve
The shell output will include a localhost
URL where you can preview the book.