Gitlab Workflow

Published: Wednesday, Dec 7, 2022 Last modified: Friday, May 24, 2024

When making a change my workflow is:

  1. git status to see if we are clean
  2. git branch to check which is likely the “main” branch
  3. git checkout main - switch to “main” branch (assuming it’s not master)
  4. git pull make sure I’m working with the latest
  5. git checkout -b $name-of-thing-I-will-work-on - wish I could say naming the branch is easy
  6. Stage a prefect commit
  7. git commit with [Jira tag], often requires a look up in a browser because I can’t remember
  8. git push
  9. Follow push message: To create a merge request for $name-of-thing-I-will-work-on, visit:
  10. Click create MR and remove weird closes [Jira tag] in description autofilled by Gitlab 🤷
  11. Click Approve if I can, otherwise goto slack and paste URL for someone to hopefully review
  12. Try merge if I can (after CI is complete, wait ~5mins)
  13. Back to terminal, perhaps delete merged branch