diff --git a/git/ressources/.bashrc b/git/ressources/.bashrc new file mode 100644 index 0000000000000000000000000000000000000000..7fd2a1045cc2416fe7c3479321aa64895f4e0bdf --- /dev/null +++ b/git/ressources/.bashrc @@ -0,0 +1,52 @@ + +GITPATH=~/git + +function gsm { +gnome-system-monitor & +} +alias gsm='gsm' + +function gob { +cd ~ && +cd ${GITPATH}/biblio/ && +gitup && +git st +} +alias gob='gob' + +function gos { +cd ~ && +cd ${GITPATH}/spacescriptsgeneric/ && +gitup +} +alias gos='gos' + +function gitup { +git pull --rebase origin master +} +alias gitup='gitup' + +function gitpush { +if git push origin master; then + echo "ok master" +else + echo "trying with main" + git push origin main +fi +} +alias gitpush='gitpush' + +function gitci { +git ci -am "$1" +} +alias gitci='gitci' + +function gitgo { +gitci "$1" && +gitup && +gitpush +git st +} +alias gitgo='gitgo' + + diff --git a/git/ressources/.gitconfig b/git/ressources/.gitconfig new file mode 100644 index 0000000000000000000000000000000000000000..2d2ea0fd472e9a5239a113d78d6771c230bd225c --- /dev/null +++ b/git/ressources/.gitconfig @@ -0,0 +1,47 @@ +[user] + email = johnny.perfect@isae.fr + name = j.perfect +[alias] + ci = commit + st = status + br = branch + co = checkout + df = diff + who = shortlog -s -- + + #Checking out a repo and it's submodules is not part of the regular 'git checkout' command. Normally you need a two command sequence + #git checkout *oldcommit* + #git submodule update --recursive + co-recurse = !sh -c 'git checkout $1 && git submodule update --recursive' - + + lg = log -p + + graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" + graphviz2 = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" + +# git graphviz2 | dot -Tpdf > test.pdf && evince test.pdf + + lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all + lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all + lg = !"git lg1" + bp = big-picture + up = "!git remote update -p; git merge --ff-only @{u}" +[credential] + helper = store + ff = fetch + + redate = rebase --committer-date-is-author-date + + up = pull --rebase origin master + + +[diff] + tool = meld +[difftool] + prompt = false +[difftool "meld"] + cmd = meld "$LOCAL" "$REMOTE" + + +[http] + postBuffer = 1024288000 diff --git a/git/ressources/.gitignore b/git/ressources/.gitignore new file mode 100755 index 0000000000000000000000000000000000000000..68b5f214c0ee64a78d3710df8aa14c0a19696f46 --- /dev/null +++ b/git/ressources/.gitignore @@ -0,0 +1,9 @@ +# Eclipse +.classpath +.project +.settings/ +bin/ + +# Maven +log/** +target/** diff --git a/git/ressources/.gitlab-ci.yml b/git/ressources/.gitlab-ci.yml new file mode 100755 index 0000000000000000000000000000000000000000..bc737290021ffc9420325ce4213a3c7837e2a5be --- /dev/null +++ b/git/ressources/.gitlab-ci.yml @@ -0,0 +1,17 @@ +stages: +- build +- test +- quality + +build: + stage: build + script: "mvn -Dmaven.test.skip=true clean install" + +test: + stage: test + script: "mvn test" + +quality: + stage: quality + script: "mvn -Dmaven.test.skip=true verify" +