update bash and git config for linux/ubuntu

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
Andrei Jiroh Eugenio Halili 2021-06-27 19:02:37 +08:00
parent 974406e1b1
commit 413a61bdba
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
2 changed files with 26 additions and 4 deletions

View File

@ -128,9 +128,8 @@ export PATH="$HOME/.deta/bin:$PATH"
# scripts in ~/.local/bin and ~/.dotfiles/bin
# also $HOME/.cargo/bin
export DOTFILES_HOME="$HOME/.dotfiles"
export DOTFILES_STUFF_BIN="$DOTFILES_HOME/bin"
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$DOTFILES_STUFF_BIN:$PATH"
export DOTFILES_HOME="$HOME/.dotfiles" DOTFILES_STUFF_BIN="$DOTFILES_HOME/bin" GOLANG_PATH=/usr/local/go/bin
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$GOLANG_PATH:$DOTFILES_STUFF_BIN:$PATH"
# use nano instead of vi
# for git, there's the option of firing up VS Code, if you prefered.

View File

@ -6,5 +6,28 @@
signingkey = A30EBE40AD856D88
[commit]
gpgsign = true
# Enforce SSH
# We commented thus block out coz we use the GitHub CLI's Git Credential
# helper stuff
#[url "git@github.com:"]
# insteadOf = https://github.com/
# pushInsteadOf = https://github.com/
[url "git+ssh://ajhalili2006@git.launchpad.net/"]
insteadof = lp:
insteadof = lp:
pushInsteadOf = lp:
[url "git@gitlab.com:"]
insteadOf = https://gitlab.com/
pushInsteadOf = https://gitlab.com/
[url "git@bitbucket.org:"]
insteadOf = https://bitbucket.org/
[init]
defaultBranch = main
# aliases
[alias]
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [[ \\\"$`echo $VAR`\\\" = '$OLD' ]]; then export $VAR='$NEW'; fi\" $@; }; f"
signoff = "commit --signoff"
stage = "add"
unstage = "restore --staged"
stats = "status"