GIT

%toc

Gitconfig

Datei ist unter ~/.gitconfig

[core]
       editor = vim
   [user]
       name = yourname
       email = youremail@yourhost
   [merge]
       tool = vimdiff
   [color]
       ui = true
   [push]
       default = matching

Merge

Interaktiver Merge: git difftool branch file

Gitignore

# text files
   *~
   *.swp

   # Latex:
   *.log
   *.fls
   _out_/*.pdf
   *.d
   *.aux
   *.bak
   *.make
   *.temp
   *.acn
   *.glo
   *.ist
   *.glg
   *.gls
   *.glsdefs
   *.lof
   *.lol
   *.lot
   *.toc
   *.acr
   *.alg
   *-blx.bib
   *.bbl
   *.bcf
   *.blg
   *.xml
   *.fdb_latexmk

Datei aus der History loeschen

git filter-branch --force --index-filter \
     'git rm --cached --ignore-unmatch pfad/dateiname' \
       --prune-empty --tag-name-filter cat -- --all

Dann pushe es zu einer remote:

git push origin master --force

Teile einer Datei Commiten

https://stackoverflow.com/questions/1085162/commit-only-part-of-a-file-in-git

git add --patch path/filename

Cherry Pick

git log yourbranch
   git cherry-pick <commit hash>