Git
How to avoid merge commits
git remote update -pgit merge --ff-only @{u}git rebase -p @{u}
git reset --hard HEAD~1
git reset HEAD~1Add
Commit message
Co-authored-by: Joel Califa <602352+califa@users.noreply.github.com>Push
Reset
Rebase
Stash
Checkout unwanted files
Checkout to previous branch
Edit last local commit message
Git log
Commit
Empty commit
Branch
Rename a local Git branch
Rename a current branch
Rename a brach while pointed to any branch
Git global configurations
in ~/.gitconfig
To change your Git username and email
Enable git pull use rebase by default
~/.gitignore_global
Ignore IDEA files globally
Create a new .gitignore file fetched from the GitHub repo for a "node" js app
.gitignore file fetched from the GitHub repo for a "node" js appCreating a SSH Public Key on OSX
Copy public SSH key and add it to the GitHub
UseKeychain: do not re-enter password while commiting/clonning
Add private key to keychain
How to resolve conflicts in yarn.lock
Release
Create a release tag
Push all tags
Push a single tag
List all tags
Clone
Clean up
clean unreachable object (sometimes speeds up .git)
clean outdated branches
Advanced git
Further reading
Last updated