-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
29 lines (25 loc) · 830 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# add alias to .bashrc
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
# change show untracked files change
config config --local status.showUntrackedFiles no
# clone config repo
git clone --bare git@github.com:timredband/dotfiles.git $HOME/.cfg
config checkout
# to push do config push --set-upstream origin master
#
#
# inspired from this
# git clone --bare https://bitbucket.org/durdn/cfg.git $HOME/.cfg
# function config {
# /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
# }
# mkdir -p .config-backup
# config checkout
# if [ $? = 0 ]; then
# echo "Checked out config."
# else
# echo "Backing up pre-existing dot files."
# config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
# fi
# config checkout
# config config status.showUntrackedFiles no