Skip to content

Instantly share code, notes, and snippets.

@ChunAllen
Last active April 14, 2023 06:30
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 ChunAllen/598c15a5bec538065ae4a0ac36cd601a to your computer and use it in GitHub Desktop.
Save ChunAllen/598c15a5bec538065ae4a0ac36cd601a to your computer and use it in GitHub Desktop.
Git Rebasing - Fixing merge conflicts
$ git checkout [default branch]
$ git pull origin [default branch] && git fetch (gets the latest changes from [default] branch and update the `.git` branches)
$ git checkout <your-working-branch>
$ git rebase origin/[default branch] (updates your current branch with latest changes from [default branch])
- Make sure fix any conflicts
$ git add .
$ git rebase --continue
$ git push origin <your-working-branch> -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment