Goat

From 6bit.ch wiki
Revision as of 19:57, 27 March 2025 by Xbl (talk | contribs) (→‎git log)
Jump to navigation Jump to search

git

git config

Set user name
git config --add [--global] user.name "anon"

Set user email
git config --add [--global] user.email "[email protected]"

Read
git config list [--local]
git config --get <key.value>

Remove
git config --unset <key.value>
git config --unset-all <key>
git config --remove-section <section>

git branches

Show current branch
git branch

Rename branch
git branch -m <oldname> <newname>

Create new branch
git branch <newbranch>

Create new branch and switch
git switch -c <newbranch>

Switch branch
git switch <branch>
git checkout <branch>

git log

Show logs
git log

Show logs on one line
git log --oneline

Show logs with full decoration
git log --decoration=full

Show all branches with graph
git log --graph --all