-
Notifications
You must be signed in to change notification settings - Fork 742
Git Workflow
Julia Nguyen edited this page Oct 9, 2022
·
5 revisions
Please connect to GitHub via SSH and not HTTPS, check out the instructions here.
- Fork the if me repo (if you haven't already done so).
- Clone it to your computer.
- When you're ready to work on an issue, be sure you're on the main branch. From there, create a separate branch (e.g. issue_32).
- Make your changes. If you're unsure of some details while you're making edits, you can discuss them on the ticket or in Slack.
- Commit your changes.
- Push the working branch (e.g. issue_32) to your remote fork.
- Make the pull request (on the upstream main branch)
- Do not merge it with the main branch on your fork. That would result in multiple, or unrelated patches being included in a single PR.
- If any further changes need to be made, comments will be made on the pull request.
It's possible to work on two or more different patches (and therefore multiple branches) at one time, but it's recommended that beginners only work on one patch at a time.
Periodically, you'll need to sync your repo with mine (the upstream). GitHub has instructions for doing this.
- For step 3 on that page, use https://github.com/ifmeorg/ifme.git for the URL.
- On that page, it shows how to merge the main branch (steps 4 & 5).
- When your patch is completed, do not merge your patch into the main branch of your locally cloned fork. Your patch will be merged when you sync with the remote fork.
This is useful if you're doing a code review and you want to demo someone's changes in your dev environment.
- Add someone's remote fork:
git remote add [username] https://github.com/[username]/ifme.git
- Fetch their fork:
git fetch [username]
- Checkout a specific branch:
git checkout --track [username]/[branch name]