Basic steps to follow when getting your team set up on GitHub work flow.
-
Fork repo
-
Clone down your repo and
cd
to directory -
Set up upstream branch and verify
upstream
was created
git remote add upstream <main repo link (https or ssh)>
git remote -v
- Work in feature branches. To create a branch use the -b modifier. Documentation on branching & merging.
git checkout -b <yourBranch>
- Add changes
git add -A
- Pull most recent changes from
upstream
git pull upstream <yourBranch>
- Commit changes
git commit -m "your commit message"
- Switch branches to
master
then merge<yourBranch>
tomaster
git checkout master
git merge <yourBranch>
- Ensure you're up to date with
master
git pull upstream master
- If there are changes commit your the changes from your pull
git commit -m "your commit message"
- Push changes to
origin
(your repo)
git push origin master
-
Submit pull request to
upstream
. Utilize the GUI on GitHub in your repo. -
Pull Requests should be reviewed and approved by at least 2 members to ensure quality. Utilize the comments to gain team approvals.
-
Once team members agree code is up to snuff the repo owner/admin can merge the pull request (utilize the GUI).