githubでdotfilesを管理することにした
一箇所でdotfilesを管理する必要に迫られたので、管理することにした。
以下、手順。
githubにプロジェクト『dotfiles』を作成
rdera · GitHubの『Dashboard』→『Create A Repository』
リポジトリの作成
$ cd ~ $ git init $ vi .gitignore * #全てのファイルを除外 *. #全ての隠しファイルを除外 !.bashrc # .bashrcを除外しない
ポイントは.gitignoreファイル。
$ git add . $ git commit -m "first commit."
$ git remote add origin git@github.com:rdera/dotfiles.git $ git push origin master
これで、.bashrcがgithubで管理されるようになった。
変更をgithubに反映
$ vi .bashrc #編集 $ git add . $ git push origin master
vim環境をgit/githubで管理する - wadahiroの日記
http://yuno.heroku.com/2011-06-24-dotfiles%E3%82%92GitHub%E3%81%A6%E3%82%99%E7%AE%A1%E7%90%86
http://d.hatena.ne.jp/Ubuntu/20081023/github