Skip to content

Instantly share code, notes, and snippets.

@nathanieltubb
Last active December 13, 2017 00:47
Show Gist options
  • Save nathanieltubb/7c0f4b4ac3fc98e4329f3a3dcacb9e4c to your computer and use it in GitHub Desktop.
Save nathanieltubb/7c0f4b4ac3fc98e4329f3a3dcacb9e4c to your computer and use it in GitHub Desktop.

Git Commands

Check your local status.

git status

Add all local changes and unstaged files.

git add .

Commit local staged changes to current branch.

git commit -m "msg"

Commit local staged changes to current branch tagging with issue number.

git commit -m "#23 - msg"

Remove all local cached files, useful for mass updates or including changes from .gitignore.

git rm -rf --cached .

Pushing a non-commit, used to force a deployment on some systems.

git commit --allow-empty --allow-empty-message -m ''

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