Skip to content

Instantly share code, notes, and snippets.

@AlexandraKapp
Last active May 7, 2020 13:12
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 AlexandraKapp/faa1826ee1e5cae4a46e9c1e1ec5bdf2 to your computer and use it in GitHub Desktop.
Save AlexandraKapp/faa1826ee1e5cae4a46e9c1e1ec5bdf2 to your computer and use it in GitHub Desktop.

Useful Git commands

The laziest way to delete all unused branches safely except master:

git checkout master
git branch | xargs git branch -d

Merge master into current feature branch:

git checkout feature_branch
git merge master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment