2020-01-11 22:04:45 +01:00
<?xml version="1.0" encoding="utf-8"?>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml:lang = "en" >
< head >
2020-11-03 16:27:09 +01:00
<!-- 2020 - 11 - 03 mar. 16:26 -->
2020-01-11 22:04:45 +01:00
< meta http-equiv = "Content-Type" content = "text/html;charset=utf-8" / >
< title > Git Configuration< / title >
< meta name = "generator" content = "Org mode" / >
< meta name = "author" content = "Dehaeze Thomas" / >
2020-01-11 22:22:46 +01:00
< link rel = "stylesheet" type = "text/css" href = "./css/htmlize.css" / >
< link rel = "stylesheet" type = "text/css" href = "./css/readtheorg.css" / >
< script type = "text/javascript" src = "./js/jquery.min.js" > < / script >
< script type = "text/javascript" src = "./js/bootstrap.min.js" > < / script >
< script type = "text/javascript" src = "./js/jquery.stickytableheaders.min.js" > < / script >
< script type = "text/javascript" src = "./js/readtheorg.js" > < / script >
2020-01-11 22:04:45 +01:00
< / head >
< body >
< div id = "org-div-home-and-up" >
< a accesskey = "h" href = "./index.html" > UP < / a >
|
< a accesskey = "H" href = "./index.html" > HOME < / a >
< / div > < div id = "content" >
< h1 class = "title" > Git Configuration< / h1 >
< div id = "table-of-contents" >
< h2 > Table of Contents< / h2 >
< div id = "text-table-of-contents" >
< ul >
< li > < a href = "#org41626fa" > Gitconfig< / a >
< ul >
< li > < a href = "#org9dadb2d" > Aliases< / a > < / li >
< li > < a href = "#org9891923" > Apply< / a > < / li >
< li > < a href = "#org3d3c60c" > Colors< / a > < / li >
< li > < a href = "#org005e9ea" > Default Remote< / a > < / li >
< li > < a href = "#org27b5c46" > Push Configuration< / a > < / li >
< li > < a href = "#org8e4fe7a" > User< / a > < / li >
< li > < a href = "#org437daae" > Core configuration< / a > < / li >
< li > < a href = "#org39b3cb9" > Credentials using pass< / a > < / li >
< li > < a href = "#org02367c3" > Diff-so-fancy< / a > < / li >
< li > < a href = "#org599c398" > Github< / a > < / li >
< / ul >
< / li >
< li > < a href = "#org3e19276" > Global Git Ignore< / a > < / li >
2020-11-03 16:27:09 +01:00
< li > < a href = "#org62a061b" > Pass Git Helper< / a > < / li >
2020-01-11 22:04:45 +01:00
< / ul >
< / div >
< / div >
< div id = "outline-container-org41626fa" class = "outline-2" >
< h2 id = "org41626fa" > Gitconfig< / h2 >
< div class = "outline-text-2" id = "text-org41626fa" >
< / div >
< div id = "outline-container-org9dadb2d" class = "outline-3" >
< h3 id = "org9dadb2d" > Aliases< / h3 >
< div class = "outline-text-3" id = "text-org9dadb2d" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > alias< / span > ]
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > View abbreviated SHA, description, and history graph of the latest 20 commits< / span >
< span class = "org-variable-name" > l< / span > = log --pretty=oneline -n < span class = "org-highlight-numbers-number" > 20< / span > --graph --abbrev-commit
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > View the current working tree status using the short format< / span >
< span class = "org-variable-name" > s< / span > = status -s
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Show the diff between the latest commit and the current state< / span >
< span class = "org-variable-name" > d< / span > = !< span class = "org-string" > "git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"< / span >
< span class = "org-variable-name" > di< / span > = diff --cached --ignore-all-space
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Pull in remote changes for the current repository and all its submodules< / span >
< span class = "org-variable-name" > p< / span > = !< span class = "org-string" > "git pull; git submodule foreach git pull origin master"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Clone a repository including all submodules< / span >
< span class = "org-variable-name" > c< / span > = clone --recursive
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Commit all changes< / span >
< span class = "org-variable-name" > ca< / span > = !git add -A & & git commit -av
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Switch to a branch, creating it if necessary< / span >
< span class = "org-variable-name" > go< / span > = < span class = "org-string" > "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Show verbose output about tags, branches or remotes< / span >
< span class = "org-variable-name" > tags< / span > = tag -l
< span class = "org-variable-name" > branches< / span > = branch -a
< span class = "org-variable-name" > remotes< / span > = remote -v
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Amend the currently staged files to the latest commit< / span >
< span class = "org-variable-name" > amend< / span > = commit --amend --reuse-message=HEAD
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Credit an author on the latest commit< / span >
< span class = "org-variable-name" > credit< / span > = < span class = "org-string" > "!f() { git commit --amend --author \"$1 < $2> \" -C HEAD; }; f"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Interactive rebase with the given number of latest commits< / span >
< span class = "org-variable-name" > reb< / span > = < span class = "org-string" > "!r() { git rebase -i HEAD~$1; }; r"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Remove the old tag with this name and tag the latest commit with it.< / span >
< span class = "org-variable-name" > retag< / span > = < span class = "org-string" > "!r() { git tag -d $1 & & git push origin :refs/tags/$1 & & git tag $1; }; r"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Find branches containing commit< / span >
< span class = "org-variable-name" > fb< / span > = < span class = "org-string" > "!f() { git branch -a --contains $1; }; f"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Find tags containing commit< / span >
< span class = "org-variable-name" > ft< / span > = < span class = "org-string" > "!f() { git describe --always --contains $1; }; f"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Find commits by source code< / span >
< span class = "org-variable-name" > fc< / span > = < span class = "org-string" > "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Find commits by commit message< / span >
< span class = "org-variable-name" > fm< / span > = < span class = "org-string" > "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Remove branches that have already been merged with master< / span >
< span class = "org-variable-name" > dm< / span > = < span class = "org-string" > "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > List contributors with number of commits< / span >
< span class = "org-variable-name" > contributors< / span > = shortlog --summary --numbered
< span class = "org-variable-name" > ec< / span > = config --global -e
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Pretty log output< / span >
< span class = "org-variable-name" > hist< / span > = log --graph --pretty=format:< span class = "org-string" > '%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)< %an> %Creset'< / span > --abbrev-commit --all
< span class = "org-variable-name" > pp< / span > = pull origin $(git_current_branch)
< span class = "org-variable-name" > gg< / span > = push origin $(git_current_branch)
< span class = "org-variable-name" > rhh< / span > = reset HEAD --hard
< span class = "org-variable-name" > unstage< / span > = reset HEAD --
< span class = "org-variable-name" > last< / span > = log -1 HEAD
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org9891923" class = "outline-3" >
< h3 id = "org9891923" > Apply< / h3 >
< div class = "outline-text-3" id = "text-org9891923" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > apply< / span > ]
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Detect whitespace errors when applying a patch< / span >
< span class = "org-variable-name" > whitespace< / span > = fix
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org3d3c60c" class = "outline-3" >
< h3 id = "org3d3c60c" > Colors< / h3 >
< div class = "outline-text-3" id = "text-org3d3c60c" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > color< / span > ]
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Use colors in Git commands that are capable of colored output when outputting to the terminal< / span >
< span class = "org-variable-name" > ui< / span > = true
[color < span class = "org-string" > "branch"< / span > ]
< span class = "org-variable-name" > current< / span > = yellow reverse
< span class = "org-variable-name" > local< / span > = yellow
< span class = "org-variable-name" > remote< / span > = green
< span class = "org-variable-name" > HEAD< / span > = red bold
[color < span class = "org-string" > "diff"< / span > ]
< span class = "org-variable-name" > meta< / span > = yellow bold
< span class = "org-variable-name" > frag< / span > = magenta bold < span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > line info< / span >
< span class = "org-variable-name" > old< / span > = red < span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > deletions< / span >
< span class = "org-variable-name" > new< / span > = green < span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > additions< / span >
[color < span class = "org-string" > "status"< / span > ]
< span class = "org-variable-name" > added< / span > = green
< span class = "org-variable-name" > changed< / span > = yellow
< span class = "org-variable-name" > untracked< / span > = cyan
[color < span class = "org-string" > "decorate"< / span > ]
< span class = "org-variable-name" > HEAD< / span > = red bold
< span class = "org-variable-name" > branch< / span > = green
< span class = "org-variable-name" > remoteBranch< / span > = cyan
< span class = "org-variable-name" > tag< / span > = yellow
< span class = "org-variable-name" > stash< / span > = bold yellow
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org005e9ea" class = "outline-3" >
< h3 id = "org005e9ea" > Default Remote< / h3 >
< div class = "outline-text-3" id = "text-org005e9ea" >
< div class = "org-src-container" >
< pre class = "src src-conf" > < span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Use `origin` as the default remote on the `master` branch in all cases< / span >
[branch < span class = "org-string" > "master"< / span > ]
< span class = "org-variable-name" > remote< / span > = origin
< span class = "org-variable-name" > merge< / span > = refs/heads/master
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org27b5c46" class = "outline-3" >
< h3 id = "org27b5c46" > Push Configuration< / h3 >
< div class = "outline-text-3" id = "text-org27b5c46" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > push< / span > ]
< span class = "org-variable-name" > default< / span > = matching
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Make `git push` push relevant annotated tags when pushing branches out.< / span >
< span class = "org-variable-name" > followTags< / span > = true
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org8e4fe7a" class = "outline-3" >
< h3 id = "org8e4fe7a" > User< / h3 >
< div class = "outline-text-3" id = "text-org8e4fe7a" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > user< / span > ]
< span class = "org-variable-name" > name< / span > = Thomas Dehaeze
< span class = "org-variable-name" > email< / span > = dehaeze.thomas@gmail.com
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org437daae" class = "outline-3" >
< h3 id = "org437daae" > Core configuration< / h3 >
< div class = "outline-text-3" id = "text-org437daae" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > core< / span > ]
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Use custom `.gitignore` and `.gitattributes`< / span >
< span class = "org-variable-name" > excludesfile< / span > = ~/.gitignore_global
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Treat spaces before tabs and all kinds of trailing whitespace as an error< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > [default] trailing-space: looks for spaces at the end of a line< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > [default] space-before-tab: looks for spaces before tabs at the beginning of a line< / span >
< span class = "org-variable-name" > whitespace< / span > = space-before-tab,-indent-with-non-tab,trailing-space
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Prevent showing files whose names contain non-ASCII symbols as unversioned.< / span >
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html< / span >
< span class = "org-variable-name" > precomposeunicode< / span > = false
< span class = "org-variable-name" > pager< / span > = diff-so-fancy | less --tabs=< span class = "org-highlight-numbers-number" > 4< / span > -RFX
< span class = "org-variable-name" > autocrlf< / span > = input
< span class = "org-comment-delimiter" > # < / span > < span class = "org-comment" > Open vim, start Goyo and enter insert mode on the first line< / span >
< span class = "org-variable-name" > editor< / span > = < span class = "org-string" > "nvim -c ':Goyo' -c 'goto 1' -c 'startinsert'"< / span >
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org39b3cb9" class = "outline-3" >
< h3 id = "org39b3cb9" > Credentials using pass< / h3 >
< div class = "outline-text-3" id = "text-org39b3cb9" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > credential< / span > ]
< span class = "org-variable-name" > helper< / span > = !pass-git-helper $@
[credential < span class = "org-string" > "https://github.com"< / span > ]
< span class = "org-variable-name" > username< / span > = tdehaeze
2020-11-03 16:27:09 +01:00
[credential < span class = "org-string" > "https://git.tdehaeze.xyz"< / span > ]
< span class = "org-variable-name" > username< / span > = tdehaeze
2020-01-11 22:04:45 +01:00
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org02367c3" class = "outline-3" >
< h3 id = "org02367c3" > Diff-so-fancy< / h3 >
< div class = "outline-text-3" id = "text-org02367c3" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > diff-so-fancy< / span > ]
< span class = "org-variable-name" > markEmptyLines< / span > = false
< / pre >
< / div >
< / div >
< / div >
< div id = "outline-container-org599c398" class = "outline-3" >
< h3 id = "org599c398" > Github< / h3 >
< div class = "outline-text-3" id = "text-org599c398" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > github< / span > ]
< span class = "org-variable-name" > user< / span > = tdehaeze
< span class = "org-variable-name" > oauth-token< / span > = 8cc5b41120f7e9a869c24fa3678667d3d8422e6f
< / pre >
< / div >
< / div >
< / div >
< / div >
< div id = "outline-container-org3e19276" class = "outline-2" >
< h2 id = "org3e19276" > Global Git Ignore< / h2 >
< div class = "outline-text-2" id = "text-org3e19276" >
< div class = "org-src-container" >
< pre class = "src src-conf" > *~
.DS_Store
Session.vim
< / pre >
< / div >
< / div >
< / div >
2020-11-03 16:27:09 +01:00
< div id = "outline-container-org62a061b" class = "outline-2" >
< h2 id = "org62a061b" > Pass Git Helper< / h2 >
< div class = "outline-text-2" id = "text-org62a061b" >
< div class = "org-src-container" >
< pre class = "src src-conf" > [< span class = "org-type" > github.com*< / span > ]
< span class = "org-variable-name" > target< / span > =github.com/tdehaeze
[< span class = "org-type" > git.tdehaeze.xyz*< / span > ]
< span class = "org-variable-name" > target< / span > =git.tdehaeze.xyz/tdehaeze
[< span class = "org-type" > gitlab.esrf.fr*< / span > ]
< span class = "org-variable-name" > target< / span > =gitlab.esrf.fr/dehaeze
< / pre >
< / div >
< / div >
< / div >
2020-01-11 22:04:45 +01:00
< / div >
< div id = "postamble" class = "status" >
< p class = "author" > Author: Dehaeze Thomas< / p >
2020-11-03 16:27:09 +01:00
< p class = "date" > Created: 2020-11-03 mar. 16:26< / p >
2020-01-11 22:04:45 +01:00
< / div >
< / body >
< / html >