- Install Git or your favorite Git client.
- (Optional) Setup an SSH Key for GitHub.
- Create a parent projects directory on your system.
- Go to the freeCodeCamp Alumni Network (FFCAN) repository: https://github.com/FCC-Alumni/alumni-network
- Click the "Fork" Button in the upper right hand corner of the interface (More Details Here)
- After the repository has been forked, you will be taken to your copy of the FCCAN repo at
yourUsername/alumni-network
- Open a Terminal / Command Line / Bash Shell in your projects directory (i.e.:
/yourprojectdirectory/
) - Clone your fork of FCCAN
$ git clone https://github.com/<yourUsername>/alumni-network.git
This will download the entire FCCAN repo to your project's directory.
- Change directory to the new FCCAN directory (
cd alumni-network
) - Add a remote to the official FCCAN repo:
$ git remote add upstream https://github.com/FCC-Alumni/alumni-network.git
Congratulations, you now have a local copy of the FCCAN repo!
Now that you have a copy of your fork, there is work you will need to do to keep it current.
Do this prior to every time you create a branch for a PR:
- Make sure you are on the
master
branch
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
If your aren't on
master
, resolve outstanding files / commits and checkout themaster
branch
$ git checkout master
- Do a pull with rebase against
upstream
$ git pull --rebase upstream master
This will pull down all of the changes to the official master branch, without making an additional commit in your local repo.
- (Optional) Force push your updated master branch to your GitHub fork
$ git push origin master --force
This will overwrite the master branch of your fork.
Before you start working, you will need to create a separate branch specific to the issue / feature you're working on. You will push your work to this branch.
Name the branch something like fix/xxx
or feature/xxx
where xxx
is a short description of the changes or feature you are attempting to add. For example fix/email-login
would be a branch where you fix something specific to email login.
To create a branch on your local machine (and switch to this branch):
$ git checkout -b [name_of_your_new_branch]
For example:
$ git checkout -b fix/minor-typo
and to push to GitHub:
$ git push origin fix/minor-type