I have my dev files at ~/bin/, while my Git repo files at ~/github/myProject/. I always run the following file to copy files from the former location to the latter one:
#!/bin/zsh
# editors# {{{
cp /Users/Masi/.emacs /Users/Masi/gitHub/MasiDvorak/
cp /Users/Masi/bin/editors/emacs/* /Users/Masi/gitHub/MasiDvorak/editors/emacs/
cp /Users/Masi/.vimrc /Users/Masi/gitHub/MasiDvorak/
cp /Users/Masi/bin/editors/vim/* /Users/Masi/gitHub/MasiDvorak/editors/vim/
# }}}
# shells# {{{
cp /Users/Masi/.bashrc /Users/Masi/gitHub/MasiDvorak/
cp /Users/Masi/.profile /Users/Masi/gitHub/MasiDvorak/
cp /Users/Masi/.zshrc /Users/Masi/gitHub/MasiDvorak/
# }}}
# programming# {{{
cp /Users/Masi/.screenrc /Users/Masi/gitHub/MasiDvorak/
cp /Users/Masi/.Xmodmap /Users/Masi/gitHub/MasiDvorak/
cp /Users/Masi/.xmonad/xmonad.hs /Users/Masi/gitHub/MasiDvorak/.xmonad/
cp /Users/Masi/.gdbinit /Users/Masi/gitHub/MasiDvorak/
cp /Users/Masi/.xmonad/xmonad.hs /Users/Masi/gitHub/MasiDvorak/
...
# }}}
The reason is that I want to avoid the files such as
xmonad.hs~ # all ~ -files
.gitconfig
to be added to my Git repo.
My way of coping the files starts to be challenging to be controlled, since it is time-consuming for me to find and add each file to the file copy_dev-files_to_github.
How do you copy development files to your local Git repo?