Skip to content

Instantly share code, notes, and snippets.

@Raymundo1
Created June 2, 2023 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raymundo1/fe7aded1b413d81b13e654393b5e9e9d to your computer and use it in GitHub Desktop.
Save Raymundo1/fe7aded1b413d81b13e654393b5e9e9d to your computer and use it in GitHub Desktop.
Git Rebase #git
# If you’re not entirely comfortable with git rebase,
# you can always perform the rebase in a temporary branch.
# That way, if you accidentally mess up your feature’s history,
# you can check out the original branch and try again. For example:
git checkout feature
git checkout -b temporary-branch
git rebase -i main
# [Clean up the histroy]
# if MR, no need for following two commands
# git checkout main
# git merge temporary-branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment