Skip to main content

git

PLEASE NOTE: I am in the process of making my notes public. This docs section is still work in progress. It currently is a summary of random tips for various things.
Found a mistake? Want to add something? Feel free to open an issue, send a pull request or an e-mail.

Source - Contributions are welcome!

General info:
Homepage
Wikipedia
Source code
Documentation
Manual
Usefull links:
Blog posts

Basics

Show staged changes:
git diff --cached
Show unstaged changes pre git add:
git diff
Undo git add:
git restore FILENAME

Commits

Revert commits, keep the changes:
git reset HEAD^
Show local commits that are not pushed to remote:
git log --branches --not --remotes

Branch

Deleting a branch:
git branch -d BRANCHNAME
git branch -D BRANCHNAME # in case git gives you an error

Random

Show git remote:
git remote -v
Rename git remote e.x. origin:
git remote rename OLDNAME NEWNAME

E-Mail hellofoo@ittafoovern.comcom

TODO:
placeholder