Skip to content

Instantly share code, notes, and snippets.

@galarant
Last active August 29, 2015 14:19
Show Gist options
  • Save galarant/e8e667ee7b3442a4f8aa to your computer and use it in GitHub Desktop.
Save galarant/e8e667ee7b3442a4f8aa to your computer and use it in GitHub Desktop.
basic loom workflow

Workflow for Tickets:

  1. in JIRA, move your ticket to "In Progress"
  2. make sure your current branch is clean: git status
  3. checkout the latest release: git checkout [release_branch_name]
  4. pull the upstream changes on the latest release branch: git pull origin [release_branch_name]
  5. create and checkout a working branch off of the release: git checkout -b [working_branch_name]
  6. do your work on the branch
  7. when work is finished, stage your changes: git add .
  8. commit the staged changes: git commit -m 'descriptive commit message'
  9. make sure your branch is clean: git status
  10. if so, checkout the latest release branch: git checkout [release_branch_name]
  11. pull the upstream changes on the latest release branch: git pull origin [release_branch_name]
  12. checkout your working branch again: git checkout [working_branch_name]
  13. rebase your working branch against the release branch: git rebase -i [release_branch_name]
  14. after rebase, push your working branch upstream: git push origin [working_branch_name]
  15. on Github, create a pull request to merge your working branch into the release branch
  16. in JIRA, move your ticket into "In Review"
  17. let someone know about the pull request and they will either reject or merge it
  18. If the pull request is rejected, then it should be closed and the issues that caused the rejection should be fixed on an rc branch. You can create an rc branch like this: git checkout [working_branch_name] then git checkout -b [working_branch_name-rc1]
  19. Go through the normal workflow with the new rc branch (i.e. 6 through 15 above) and you will have a new pull request ready for review
  20. once merged, the person who merged it will update your JIRA ticket to "Merged" status

Cutting a Release:

  1. Once a release has gone through QA and is ready to deploy, checkout the branch: git checkout [release_branch_name]
  2. Pull the release branch from remote to make sure you have all upstream changes: git pull origin [release_branch_name]
  3. Edit package.json and update the version entry to match the release number
  4. Add and commit that change: git commit -am 'bumped version number to [foo]'
  5. Push the change upstream: git push origin [release_branch_name]
  6. Tag the commit: git tag [release_branch_name]
  7. Push the tag upstream: git push origin tags/[release_branch_name]
  8. Checkout master: git checkout master
  9. Pull master from upstream: git pull origin master
  10. Merge the latest release into master: git merge [release_branch_name]
  11. Push master upstream: git push origin master
  12. Create and checkout the next release branch: git checkout -b [next_release_branch_name]
  13. Push the next release branch upstream: git push origin [next_release_branch_name]
  14. Send a @channel message to slack to let everyone know that the next release branch is there
  15. Create a release in JIRA that matches the next branch name: Releases -> Manage Versions
  16. Move all tickets not marked "Done" in the current release to the next release: Issues -> View All Issues and Filters
  17. Run a query to get all of the relevant tickets: project = LOOM AND fixVersion = [release_branch_name] AND status != "Done"
  18. Bulk update tickets to move to the next version: Tools -> Bulk Operation -> Select All Tickets -> Edit Issues -> Change Fix Version -> Replace All With -> [next_release_branch_name]
  19. Add a Quick Filter to the board for the next release and delete the Quick Filter for the previous release: Board -> Configure -> Quick Filter

Resolving Merge Conflicts

  1. If your rebase is unsuccessful, git will give you a message like could not apply xxxx .... This indicates a merge conflict with one or more files. Run git status to see a list of files that have merge conflict issues. These will be the files in red. Complete steps 2 and 3 below for each file in red:
  2. Open the file in a text editor and resolve the conflict by merging the conflicting code together. BE SURE to delete the extra markup that git added (i.e. <<<<<< HEAD, ========== and <<<<<<< branch-name-foo)
  3. Once the conflict is resolved for that file, you can notify git by running git add <file_name>
  4. Once this is done for all conflicting files (i.e. you can run a git status and nothing shows up in red) then you can run git rebase --continue
  5. git should tell you that the rebase has completed successfully, and so you can continue with the normal workflow
@medun
Copy link

medun commented Apr 14, 2015

Quit the LOOM process
Close out of your files / text editor

  • when switching branches
  • when pulling / pushing branches / rebasing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment