Skip to content

Instantly share code, notes, and snippets.

@richardoey
Created March 16, 2021 06:14
Show Gist options
  • Save richardoey/68424edba12fd823c30de475c4519fb2 to your computer and use it in GitHub Desktop.
Save richardoey/68424edba12fd823c30de475c4519fb2 to your computer and use it in GitHub Desktop.
Workflow working while waiting for pending PR

Preferred workflow for this:

  1. On branch master, git checkout -b user_story_1.
  2. Make changes to user_story_1.
  3. Open PR for user_story_1.
  4. On branch user_story_1, git checkout -b user_story_2.
  5. Make changes to user_story_2.
  6. Once user_story_1 gets merged into master, switch to user_story_2 and do git rebase -i master.
  7. This should show you a list of commits on user_story_2 that you want to include in the rebase. Delete the top few commits that came from user_story_1.
  8. The rebase should complete cleanly unless master was updated with other changes. Now you have user_story_2 rebased on master and only having its commits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment