Skip to content

Instantly share code, notes, and snippets.

@pixmin
Last active November 14, 2018 10:57
Show Gist options
  • Select an option

  • Save pixmin/97aefdde910d53d5b48ca38092b7bc4f to your computer and use it in GitHub Desktop.

Select an option

Save pixmin/97aefdde910d53d5b48ca38092b7bc4f to your computer and use it in GitHub Desktop.
Git useful commands

Git Useful Commands

Git log

Show files changed yesterday

git diff master@{"yesterday"} --stat`

Yesterday's commits (last 24h)

git log --oneline --since=yesterday

Git push

Push to multiple remotes at once

Get your remotes URLs (for the next step)

git remote -v

Set your remotes

git remote set-url --add --push origin git@github.com:pixmin/remote1.git
git remote set-url --add --push origin git@github.com:pixmin/remote2.git

Check it out by running:

git remote show origin

When pushing using -v to check which remotes are updated:

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