Git config

This commit is contained in:
Brieuc Dubois 2024-01-26 23:49:54 +01:00
parent 6347c150d8
commit ac5f5ca116
9 changed files with 80 additions and 5 deletions

View File

@ -0,0 +1,50 @@
[credential]
helper = bw
[core]
editor = vim
autocrlf = input
[user]
email = git@bhasher.com
name = Brieuc Dubois
[commit]
gpgsign = false
[init]
defaultBranch = master
[gpg]
program = gpg
[color]
ui = auto
diff = auto
status = auto
branch = auto
[help]
autocorrect = 30
[alias]
graph = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold blue)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
logdoga = log --decorate --oneline --graph --all
s = status
d = diff
[push]
default = simple
[includeIf "hasconfig:remote.*.url:https://git.bhasher.com/**"]
path = .gitconfig-git.bhasher.com
[includeIf "hasconfig:remote.*.url:https://git.licolas.net/**"]
path = .gitconfig-git.licolas.net
[includeIf "hasconfig:remote.*.url:https://forge.uclouvain.be/**"]
path = .gitconfig-forge.uclouvain.be
[includeIf "hasconfig:remote.*.url:git@forge.uclouvain.be:**"]
path = .gitconfig-forge.uclouvain.be
[includeIf "hasconfig:remote.*.url:https://github.com/**"]
path = .gitconfig-github.com
[includeIf "hasconfig:remote.*.url:git@github.com:**"]
path = .gitconfig-github.com
[includeIf "hasconfig:remote.*.url:https://gitlab.com/**"]
path = .gitconfig-gitlab.com

View File

@ -0,0 +1,7 @@
[user]
email = brieuc.a.dubois@student.uclouvain.be
name = Dubois Brieuc
# signingkey = C813418463720FBE
[commit]
gpgsign = false

View File

@ -0,0 +1,3 @@
[user]
email = git@bhasher.com
name = Brieuc Dubois

View File

@ -0,0 +1,3 @@
[user]
email = git.licolas@bhasher.com
name = Brieuc Dubois

View File

@ -0,0 +1,3 @@
[user]
email = github.it@bhasher.com
name = Bhasher

View File

@ -0,0 +1,4 @@
[user]
email = github.it@bhasher.com
name = Brieuc Dubois

View File

@ -1,8 +1,8 @@
[include]
path = ~/Documents/sync/.config/git/.gitconfig
path = ~/.config/custom/git/.gitconfig
[safe]
directory = /opt/flutter
[core]
excludesfile = /home/bhasher/.gitignore_global
excludesfile = ~/.config/custom/git/.gitignore_global
[init]
defaultBranch = master

View File

@ -3,18 +3,23 @@
src_dir="../root"
dst_dir="/"
amount=0
function create_hard_links() {
local src_path="$1"
local dst_path="$2"
for item in "$src_path"/*; do
for item in "$src_path"/* "$src_path"/.[^.]*; do
if [ -d "$item" ]; then
mkdir -p "${dst_path}${item#$src_path}/"
create_hard_links "$item" "${dst_path}${item#$src_path}/"
elif [ -f "$item" ] && [[ ! "$item" =~ \.enc$ ]]; then
ln "$item" "${dst_path}${item#$src_path}"
ln -f "$item" "${dst_path}${item#$src_path}"
amount=$((amount+1))
fi
done
}
create_hard_links "$src_dir" "$dst_dir"
create_hard_links "$src_dir" "$dst_dir"
echo "Hard links created: $amount"