Skip to content

Instantly share code, notes, and snippets.

@npapratovic
Last active January 10, 2023 09:52
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 npapratovic/9cd25829f711d770a9e103a001da680d to your computer and use it in GitHub Desktop.
Save npapratovic/9cd25829f711d770a9e103a001da680d to your computer and use it in GitHub Desktop.
Sync current branch with master / main branch to avoid merge conflicts
  1. Do all work on separate branch
  2. Commit and push to origin
  3. Checkout master branch
  4. Git pull master
  5. Checkout separate branch
  6. Git merge origin/master branch into separate branch
  7. Git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment