Skip to content

Instantly share code, notes, and snippets.

@squidge
Created June 16, 2017 15:45
Show Gist options
  • Save squidge/e0f11b0f27bcb04403cd118796863ce2 to your computer and use it in GitHub Desktop.
Save squidge/e0f11b0f27bcb04403cd118796863ce2 to your computer and use it in GitHub Desktop.
Git tricks
$ git rm --cached filename
$ git merge <branch-name> —squash —no-commit

##Getting info

Get log since 2 weeks

$ git log --since=2.weeks --author=jlara

Get log since specific date

$ git log --since="2014-03-18" --author=jlara --all-match

Get log since 3 weeks for both authors

$ git log --since=3.weeks --author=jlara --author=rgutierrez --all-match

Clean untracked files

$ git clean -f -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment