Skip to content

Instantly share code, notes, and snippets.

@dvdantunes
Last active January 10, 2019 14:14
Show Gist options
  • Save dvdantunes/7ce225517e8b1ac1a929972ee25a5ba6 to your computer and use it in GitHub Desktop.
Save dvdantunes/7ce225517e8b1ac1a929972ee25a5ba6 to your computer and use it in GitHub Desktop.
git-snipets
Git snipets
************
Delete a branch (local or remote)
**************************************
git branch -d the_local_branch
git push origin :the_remote_branch
or with the new syntax (v1.7.0):
git push origin --delete the_remote_branch
To sync local branch list:
git fetch -p
@see https://makandracards.com/makandra/621-git-delete-a-branch-local-or-remote
Ignore files locally
*********************
vim .git/info/exclude
@see https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment