Skip to content

Instantly share code, notes, and snippets.

@wastefulox
Created December 4, 2018 17:48
Show Gist options
  • Save wastefulox/d97df7d100d34ee1d5b1552221ad8d65 to your computer and use it in GitHub Desktop.
Save wastefulox/d97df7d100d34ee1d5b1552221ad8d65 to your computer and use it in GitHub Desktop.
Git Workflow
# walking through the workflow
# steps for working on a project, on a subcomponent.
git checkout master
git fetch
git merge origin/master
git checkout -b feedback_form
git add feedback.html
git commit -m "created mockup for feedback form"
git fetch
git push -u origin feedback_form
# a collaborator might run through the following steps if they were to checkout and add to the branch made
git checkout master
git fetch
git merge origin/master
git checkout -b feedback_form origin/feedback_form
git log --oneline
git show 84b6adf0
# the collaborator makes updates to the feeback form and wants to commit those changes.
git commit -am "add tour selector to feedback form"
git fetch
git push
# before merging the change in, we should review the change. this is back to us...
git fetch
git log -p feedback_form..origin/feedback_form
git merge origin/feedback_form
git checkout master
git fetch
git merge origin/master
git merge feedback_form
git push
# at this point, all changes from the feedback_form branch get merged into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment