git

git push –force

Commit messages

  • conventionalcommits - The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.

Tips

Make a reset of your repo to relative time

1
git reset master@{"1 month ago"}

Removing sensitive data from a repository

Avoid cloning all history of repository

1
git clone <repo_url> --depth=1

Difference between two branches

1
git diff branch1..branch2

Find when a file was deleted

1
git log --full-history -- myFile

Plugins

Tools

  • overcommit - A fully configurable and extendable Git hook manager
  • goops - A CLI tool that automagically adds or recommends the best .gitignore for your project
  • autogit - Define commands, using plugins, to execute across all your repositories.

Comments

⬆︎TOP