Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. create a local back up branch in case the branch is messed up

  2. switch to the branch of the PR that has the sensitive data

  3. make a commit to delete the sensitive data if you have not (this is for the sensitive data not to show on GitHub after force-pushing)

  4. push the branch

  5. rewrite commit history using git rebase -i
    (https://docs.github.com/en/get-started/using-git/using-git-rebase-on-the-command-line )

  6. force-push

Expand
titleDemo

Situation: We have a PR that has two commits. The first commit has sensitive data.

  1. make a commit to remove the sensitive data

  2. push the branch

  3. rewrite commit history

    Screen Recording 2023-08-09 at 3.44.24 PM.mov

  4. force-push