Start by cloning into home dir
git clone https://github.com/BarSoapAng/dotfiles.git ~/.dotfilesBash setup:
echo '[ -f ~/.dotfiles/bashrc/.bashrc ] && source ~/.dotfiles/bashrc/.bashrc' >> "$HOME/.bashrc" # Sources the dot file as barrel file
grep -qxF 'source "$HOME/.bashrc"' "$HOME/.bash_profile" || echo 'source "$HOME/.bashrc"' >> "$HOME/.bash_profile" # Main bash profile controller, checks if this line already exists before appending
source "$HOME/.bashrc"Check the contents of .bashrc:
code ~/.bashrcPowershell setup:
Add-Content -Path $PROFILE -Value '. "$HOME\.dotfiles\powershell\Microsoft.PowerShell_profile.ps1"' # Adds the cloned dotfile to powershell profile
. $PROFILE # Sources the dotfile!Check the contents of $PROFILE:
notepad $PROFILEb="cd .."
home="cd ~"
oa="notepad ~/.dotfiles/bashrc/.aliases"
sz="source ~/.bashrc"lint="npx eslint --fix"gitc="git checkout"
gitcm="git checkout <default_branch>"
gitb="git branch"
gitbd="git branch -D"
gitcb="git checkout -b"
gitr="git reset"
gitrh="git reset --hard"
gitrm="git rebase <default_branch>"
gitrc="git rebase --continue"
gitl="git log"gitp="git pull"
gs="git status"
ga="git add"
gaa="git add ."
grs="git restore --staged"
gc="git commit -m"
gac="git commit -am"
gaac="git add . && git commit -m"
gp="git push -u origin <current_branch>"
gpf="gp --force-with-lease"nvmup # Updates nvm using .nvmrc in current directory