Git Tips

Contents

Restore a deleted file or directory

Search a file's history

Diff a specific file

Find a file in history

Delete a remote branch

Set the upstream for a branch

View changes in a stash

Add a single file to a stash

Create a branch from a stash

Delete all branches except for the ones you want to keep

To keep the remote's changes in a merge (i.e. you want to wipe out local changes):

Clean up stale remote references

Skip commit hooks

Clean up already merged branches

Show summary statistics of a diff

Stash untracked files

Configure Editor