Skip to content

Instantly share code, notes, and snippets.

@primitiveshaun
Last active April 6, 2020 19:40
Show Gist options
  • Save primitiveshaun/feee0a6499d06d539af97c616ce6d108 to your computer and use it in GitHub Desktop.
Save primitiveshaun/feee0a6499d06d539af97c616ce6d108 to your computer and use it in GitHub Desktop.
git-commands.sh
# git-commands.sh
# *** HOUSEKEEPING! Cheeky Git! ***
# Master File: Maintained by Primitive Digital's Housekeeping Department
# https://primitivedigital.uk/housekeeping-department/
# STATUS ::: DRAFT: Requires Review
# version of git
$ git --version
# list infomation of all branches in local and remote repositories
$ git branch -a
# list infomation of all branches in remote repositories
$ git branch -r
# list infomation of current branch and commits
$ git show-branch
# add remote repo
$ git add origin <repo-url>
# replace remote repo
$ git remote set-url origin <repo-url>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment