diff --git a/README.md b/README.md index 3c4c220..b48b021 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,55 @@ Our open source community's Wiki focuses on answering your questions about learn ## Get a Fork ready -You can get your own fork by using the button or clicking [this](https://github.com/FreeCodeCamp/wiki/new/master?readme=1#fork-destination-box). -Once you get a fork, you will clone it with `git clone url` where `url` is the link to your fork. +1. Fork it: You can get your own fork of our wiki by using the button or clicking [this](https://github.com/FreeCodeCamp/wiki/new/master?readme=1#fork-destination-box). -Once that is done, you can start contributing by checking our [issues](https://github.com/FreeCodeCamp/wiki/issues) and creating nee pull requests. + ![Fork Button](https://help.github.com/assets/images/help/repository/fork_button.jpg) + +2. Once you have forked the repository, you will clone it with: + + ```sh + $git clone https://github.com/YOUR-USERNAME/wiki.git + ``` + + This will make a local copy on your machine. + +3. Add the remote: You will need a way to keep your fork synchronized with the original repository. The following command will show you **verbose** list of the current remotes you have. + + ```sh + $git remote -v + origin https://github.com/YOUR_USERNAME/wiki.git (fetch) + origin https://github.com/YOUR_USERNAME/wiki.git (push) + ``` + + This means there is no remote pointing to the original repository you forked from. You would add it with: + + ```sh + $git remote add upstream https://github.com/FreeCodeCamp/wiki.git + ``` + + This will create a new remote named **upstream**. You can verify the changes with `git remote -v` + + ```sh + $git remote -v + origin https://github.com/YOUR_USERNAME/wiki.git (fetch) + origin https://github.com/YOUR_USERNAME/wiki.git (push) + upstream https://github.com/FreeCodeCamp/wiki.git (fetch) + upstream https://github.com/FreeCodeCamp/wiki.git (push) + ``` + +4. Sync the fork when needed: After another PR has been merged, you will need to fetch the changes and rebase your work. + + ```sh + $git fetch --all --prune # fetch all remote repos and delete any deleted branches + $git checkout master # switch to `master` branch + $git rebase --preserve-merges upstream/master # preserve merge commits while rebasing + ### or better + $git reset --hard upstream/master # SAFE! to do as `master` branch shouldn't be committed to directly + $git push origin master # push changes to your forked wiki repo + ``` + +5. Once you have completed these steps, you can start contributing by checking our [issues](https://github.com/FreeCodeCamp/wiki/issues) and creating new pull requests. ## Contribution Guides -We currently have a couple of guides to help you contribute, via the browser, command line or desktop application. - -- [How To Contribute From Your Browser:](Wiki-Contribute-Online) This is currently the easiest way we have to contribute. A simplified version can be found on [here](https://medium.freecodecamp.com/how-to-land-your-first-open-source-contribution-from-your-browser-in-15-minutes-756d9bbf81ad) also. -- [How To Contribute To The Wiki Locally:](Wiki-Contribute-Local-GUI) This is a guide that will show you how to have a local copy so you can make changes from your computer, it also works for contributing to the main repository. -- [Pull Request Guidelines](PULL_REQUEST_TEMPLATE) -- [More on how to make a pull request from a fork](Pull-Request-Contribute) -- [How to Squash Commits:](git-rebase#squashing-multiple-commits-into-one) We required only one commit per Pull Request unless otherwise specified by a moderator. - -you can find this and much more guides and information on the [Wiki Central Page](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Wiki). +We currently have a couple of guides to help you contribute, via the browser, command line or desktop application. You can find this and many more guides and information on the [Wiki Central Page](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Wiki).