2f0833e717 / dotfile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotfile

Github issues Github forks Github stars Github top language Github license

How does it work?(bash_alias)

this is linux(ubuntu-18.04/20.04)'s dotfile

1. custom bash alias(

  • bash
  • vi
  • vscode
  • windows-command-exe
  • git-command
  • github-command
  • ...)

2. git auto deployment comannds

  • git checkout
  • git pull
  • git branch
  • git status
  • git add
  • git commit
  • git push
  • gh pr create
  • gh pr merge
  • git pull
  • git log
  • gh pr list
  • gh repo view

how to devops(dev ~ ci/cd)

step1. clone to project

mkdir ~/work/
cd ~/work/
git clone https://github.com/2f0833e717/dotfile
cd dotfile

step2. edit & update

# edit .dotfiles
vi ~/work/.bash_alias
# cpb is work -> home dotfile(save)
cpb

# if dev & alias testing
vi ~/.bash_alias
# sb is bash loading test(error check)
sb

step3. push to git

upb

sample script

!no maintenance. new files is get clone project!

My dotfile upload to Git

alias upbb="
	cd ~/work/dotfile
	coba && gpadaa && cpba
	cd -"
alias upb="upbb"

copy home path dotfile -> dotfile project(work)

alias cob="
	cp -rf ~/.bash_aliases ~/work/dotfile/
	cp -rf ~/.bash_profile ~/work/dotfile/
	cp -rf ~/.bashrc ~/work/dotfile/
	cp -rf ~/.gitconfig ~/work/dotfile/
	cp -rf ~/.profile ~/work/dotfile/
	cp -rf ~/.vim ~/work/dotfile/
	cp -rf ~/.vimrc ~/work/dotfile/"

copy dotfile project(work) -> home path dotfile & reloading

alias cpb="
	cp -rf ~/work/dotfile/.bash_aliases ~/
	cp -rf ~/work/dotfile/.bash_profile ~/
	cp -rf ~/work/dotfile/.bashrc ~/
	cp -rf ~/work/dotfile/.gitconfig ~/
	cp -rf ~/work/dotfile/.profile ~/
	cp -rf ~/work/dotfile/.vim ~/
	cp -rf ~/work/dotfile/.vimrc ~/
	sb"
alias sb="source ~/.bashrc"
# ~/.bash_aliases
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

Custom bash deploy echo alias settings

echoo(){
	echo "======== alias ========"
}
alias gceda="echoo && alias gced && gced"
alias gpla="echoo && alias gpl && gpl"
alias gbaa="echoo && alias gba && gba"
alias gsta="echoo && alias gst && gst"
alias gada="echoo && alias gad && gad"
alias gcoaa="echoo && alias gcoa && gcoa"
alias gpuda="echoo && alias gpud && gpud"
alias gpca="echoo && alias gpc && gpc"
alias gpma="echoo && alias gpm && gpm"
alias gloa="echoo && alias glo && glo"
alias gplca="echoo && alias gplc && gplc"
alias grvwa="echoo && alias grvw && grvw"
alias coba="echoo && alias cob && cob"
alias cpba="echoo && alias cpb && cpb"
alias gpadaa="echoo && alias gpada && gpada"
alias gpadna="echoo && alias gpadn && gpadn"

Custom Git alias settings

alias gcl="git clone"
alias gpl="git pull origin master"
alias gb="git branch"
alias gba="git branch -a"
alias gce="git checkout"
alias gced="git checkout dev"
alias gcebd="git checkout -b dev"
alias gst="git status"
alias gs="gst"
alias gad="git add ."
alias ga="gad"
alias gco="git commit -m"
alias gcoa="git commit -m 'fix: update'"
alias gpu="git push -u"
alias gpum="git push -u origin master"
alias gpud="git push -u origin dev"
alias glo="git log --oneline --graph -n 12"
alias gl="glo"
alias gdi="git diff"
alias gd="gdi"

Custom Github cli alias settings

alias grc="gh repo create"
alias grv="gh repo view"
alias gv="grv"
alias grvw="gh repo view --web"
alias gvw="grvw"
alias gpc="gh pr create -f"
alias gpm="gh pr merge -m"
alias gpv="gh pr view"
alias gplc="gh pr list -s closed -L 16"
alias gpvw="gh pr view -w"
alias gpv="gpvw"

Custom bash deploy alias settings

alias gpada="gceda && gpla && gbaa && gsta && gada && gcoaa && gpuda && gpca && gpma && gpla && gloa && gplca && grvwa"
alias gpadn="gceda && gpla && gada && gcoaa && gpuda && gpca && gpma && gpla"

About

License:MIT License


Languages

Language:Vim Script 84.3%Language:Shell 15.7%