- Cheat Sheet and Example is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools






Git - How to use Git.

How to manage dotfiles with GitHub

Create dotfiles

host1 ]$ mkdir dotfiles
host1 ]$ cd dotfiles
host1 ]$ vi .vimrc
host1 ]$ vi .bashrc
host1 ]$ vi

FILE=".vimrc .bashrc"
cd ~/
for i in $FILE
    test -f ~/${i} && cp ~/${i}  ~/${i}.`date -d '1day ago' +%Y%m%d`
    ln -s ~/dotfiles/${i} ~/${i}

Git User Configuration

host1 ]$ git config --global "Takaaki Kurihara"
host1 ]$ git config --global

host1 ]$ git config --global --list    <- check user configuration

push GitHub

host1 ]$ cd ~/dotfiles
host1 ]$ git init
host1 ]$ git add .
host1 ]$ git commit -m 'first commit'
host1 ]$ git remote add origin git://
host1 ]$ git -u push origin master 

Update Files

host1 ]$ vi xxxxx
host1 ]$ git add -A
host1 ]$ git status
host1 ]$ git commit -m "anything"
host1 ]$ git push origin master

clone with Other Server

host2 ]$ cd ~/
host2 ]$ git clone
host2 ]$ ls
host2 ]$ sh dotfiles/

Resync with GitHub

middleware/version-control/git/dotfiles.html.txt ยท Last modified: 2020/04/25 by admin

Page Tools