Skip to content

Git Tools

Jake Dube edited this page Oct 13, 2016 · 7 revisions

Miscellaneous

git commit

git add some_file.extension

  • Stages the file(s) to include in commit
  • This can be done on multiple files at once (or use the ".")

Git Branch

git branch

  • Displays a list of local branches

git branch -d branch_name

  • Deletes a branch if it is fully merged

git branch -D branch_name

  • WARNING - Deletes a branch that is not fully merged!

git branch -v

  • Displays a list of branches with last commit message for each

git branch -vv

  • Displays a list of branches with last commit message and remote branch is tracking (if any) for each

git branch -u remote_name/branch_name

  • Sets the current branch to track to the remote branch "remote_name/branch_name"

Git Remote

git remote

  • Displays a list of configured remotes

git remote -v

  • Displays a list of configured remotes with the URL each is linked to
Clone this wiki locally