Skip to content

Latest commit

Β 

History

History
105 lines (74 loc) Β· 3.49 KB

git.md

File metadata and controls

105 lines (74 loc) Β· 3.49 KB
sort title
2
Git Cheatsheet

Git

Git Cheatsheet

Git License EUPL 1.2 Become a sponsor to JV-conseil Follow JV conseil on StackOverflow Follow JVconseil on Twitter Follow JVconseil on Mastodon Follow JV conseil on GitHub

Table of Content

Config

Review your git configuration and settings

git --version
git config --list

Clone a specific branch

git clone --branch development https://github.com/username/project.git

src πŸ‘‰ theserverside.com

Force a "git pull"

git fetch --all
git reset --hard
git clean -f -d
git pull

src πŸ‘‰ stackoverflow.com

Revert to a good commit

cd {your-git-repo}
git log
git push origin +{good-commit-sha}:master

src πŸ‘‰ stackoverflow.com

Tags

List tags

git tag --list --column --sort tag

Signing tag with -s

git tag --sign "2.0" --message "Stable ✨"
git push origin --tags

src πŸ‘‰ Signing tags

Delete tags

git tag --delete "2.0"
git push origin --delete "2.0"

References πŸ“š

Sponsorship

If this project helps you, you can offer me a cup of coffee β˜•οΈ :-)

Become a sponsor to JV-conseil