Skip to content

Instantly share code, notes, and snippets.

@achristodoulou
Last active April 14, 2016 06:14
Show Gist options
  • Save achristodoulou/c400e0b565986345fb5ecd0f52989033 to your computer and use it in GitHub Desktop.
Save achristodoulou/c400e0b565986345fb5ecd0f52989033 to your computer and use it in GitHub Desktop.
Git useful commands

This command will remove any branches that do not exists anymore:

$ git fetch --all --prune

Get single file from git

$ git archive --remote=ssh://git@git/{repo-name}.git HEAD {filename}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment