-
Notifications
You must be signed in to change notification settings - Fork 163
Engineering Workflow
This section will give you a sample workflow when you are ready to pickup engineering work.
Keywords to understand: upstream, fork.
First, go to the main repository (this is commonly called upstream). All our repositories are listed on our main repository and this is our main c0d3.com repository. You first need to create your own copy into your own account. To do this, click on the fork
button on the top right.
Once that is successful, you will have your own copy of the codebase! This is called a fork, and you will be working off your forked repository. Keep in mind, everybody else will be contributing code to the upstream repository, so make sure you update your code with the code in the upstream repository regularly (we will show you how below).
Now you have your own fork, you can download the code (of your fork) into your machine. Get the ssh url, go a folder in your computer, then clone your fork into your computer!
Example:
cd ~/Desktop
git clone git@github.com:your-username/c0d3-app.git
cd c0d3-app
Now you have the code! Follow the instructions on the repository or ask the project owners how to run the code. You may need access to sensitive information like database username / password, etc.
Everyone engineer will be sending code to the upstream repository. Therefore, in order to keep your local code in sync, you need to tell your local repository about the upstream repository.
git remote add upstream git@github.com:garageScript/c0d3-app.git
Note - You could have named the remote url anything you want. We used "upstream" for consistency.
To add your friend's fork you could do this: git remote add friend git@github.com:.....
To get the latest code from the upstream repository, you can pull down the code:
git pull upstream master
This command pulls down the code in upstream's master branch and then merges the code into the current branch you are on.
After you have the code running on your local machine, pick an issue to work on. For example, let's say its this issue (Sometimes, you may have to create your own issues).
-
git pull upstream master
- make sure your current branch is up to date with the upstream repository. -
git checkout -b f1
- create a new branch -
git commit -m "closes #389 - adds a lessons api"
- When you create a commit, make sure you have an actioncloses
orupdates
and the issue number, then a brief description of what your commit does. -
git push origin f1
- Push your changes to your fork!
Go to the upstream url, and create a pull request from your fork's f1
branch to upstream's master branch.
The pull requests you send will become your portfolio, so make sure when you read your pull request in 5 years, or if a recruiter / engineer who did not work on the project looks at your pull request, there is enough description or screenshots to help them understand what your code does.
To see an example of a well written Pull Request, click on any of Anthony's Pull Requests
-
System Setup - Includes
git
,bash
etc. - VIM Config
- Computer Setup - List of applications that are useful to install