This repository was archived by the owner on Sep 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Git Workflow
Ross F. Calimlim edited this page Aug 10, 2019
·
7 revisions
- Pull all changes from master at the start of your coding session.
- Create feature branches (you can't push to master).
- Commit often
- Push your local feature branch to the remote org repo.
# Make sure your branch is up to date with master! You might need to resolve
# merge conflicts.
git pull
# Update your local dependencies
npm run setup
# Create (or checkout) your feature/fix/bug branch
git checkout -b your-branch-name
# Add the files you want to commit. Try to commit every 10-15 lines of
# code you write.
git add foo.html bar.js baz.yaml
# Remember to include your co-author (see below)!
git commit -m "Add commit title here"
# Once you're satisfied with your work, push your branch to the remote.
git push origin your-branch-name
# Go to GitHub and initiate a Pull Request (PR) from your branch to master.
# If you no longer need this branch, you can delete it
# locally (and/or remotely).
git branch -d your-branch-name
If you're pair programming, make sure to credit all parties!
You can do this by including co-author messages in your commit messages.
Via git commit
Commit title
Co-authored-by: co-author-username <co-author-public-email>
Via git commit -m
git commit -m "Commit message
>
>
Co-authored-by: co-author-username <co-author-public-email>"