Git

From Torben's Wiki


Notes of 2019

very nice tutorial: [1]

Settings

colorful output

git config color.ui true

log: one line per commit

format.pretty oneline

Old notes

[2] [3]

git init # create an empty git repository in the current folder
# set some settings
git config --global user.name "Torben Menke"
git config --global user.email "torben.menke@XXX.de"
git config --global color.ui auto
git config -l # shows configuration

git add somefile.txt # one file
git add somefolder # one folder
git add . # all

git commit 
git commit -a -m "message" # commit all, message="message"

git pull ssh://tmenke@[IP]/[PATH] master
# edit
# commit
git push ssh://tmenke@[IP]/[PATH] master

git log
git log --pretty=oneline --abbrev-commit