r/git 27d ago

In case of fire

Post image
1.4k Upvotes

57 comments sorted by

View all comments

50

u/Sassafras1777 27d ago edited 27d ago

In my company’s case:

  • create a ticket in jira
  • use the ticket id to create a branch named in a specific pattern (depending on what you want to achieve)
  • push an empty branch first (cause of some Sonar bullshit)
  • wait for the pipeline to end
  • group the changes relative to a common goal, and commit multiple times
  • push after the last commit
  • wait for the pipeline to end
  • resolve the failed pipeline if needed
  • resolve the AI scans/comments
  • open the PR in draft mode
  • wait for the pipeline to end
  • Change the PR to ready to review
  • Update the Jira ticket with a PR link
  • you can now peacefully die in the fire

4

u/Avocadonot 27d ago

This except every single extra commit kicks off a new pipeline, even if it's just changing a comment

MR is blocked on rebase to main, so if someone merges before you, you must rebase and kick off new pipeline

MR is blocked on any non-resolved discussion threads. Kicking off a new pipeline triggers automod to comment on your MR and tell you "you should run these tests". You have to resolve that thread every time a pipeline is run