basyura's blog

あしたになったらほんきだす。

vcs

.gitignore

vcs

入門Git勉強中。 sample.git |-- .gitignore |-- a.txt |-- b.txt `-- dir |-- a.txt `-- b.txt.gitignore が #.gitignore *.txt !a.txt !/b.txtの場合、無視されないファイルは .gitignore a.txt b.txt dir/a.txt # 始まりはコメント扱い ! 始まりは無視対…

Git の add は CVS や SVN とは違う

vcs

「リポジトリに追加する」ため「だけ」に使用するものだとばっかり思ってた。 「WEB+DB PRESS Vol.50」の git 特集に出てくる「インデックス」と「ワークツリー」の説明がよく分からなかったのは cvs のノリで git を使ってて add の振る舞いを勘違いしてた…

キーワード置換?

vcs

attributes に属性を記述する $ mkdir test_repos $ cd test_repos/ $ git init Initialized empty Git repository in /private/tmp/test_repos/.git/ $ echo '* ident' >> ./.git/info/attributes $Id$ を書いたファイルをコミットする $ echo '$Id$' >> RE…

リポジトリごとに使用するユーザ名とメールアドレスを変える

vcs

git の説明を見るとだいたい git config --global user.name globalname git config --global user.email globalname@mail.com となっていて、ユーザ名とメールアドレスを一回設定すれば特に気にしなくて良いよという感じになってる。これってそういうものだ…

clone 先の変更を pull で受け取る

vcs

$ pwd /tmp $ mkdir r1 $ cd r1 $ git init $ touch README $ git add . $ git commit . -m "first commit" $ cd /tmp $ mkdir r2 $ cd r2 $ git clone /tmp/r1 $ cd /tmp/r2/r1 $ vi README #=> hello を追記 $ git commit * -m "mod readme" $ cd /tmp/r1 …

ローカルで push pull checkout

vcs

やりたいこと リポジトリ rep1 を作り、それを clone して rep2 を作る。 rep1 の変更と rep2 の変更を互いに受け取る。 /tmp/rep1 にリポジトリを作成 $pwd /tmp $ mkdir rep1 $ cd rep1 $ git init Initialized empty Git repository in /private/tmp/rep1…

github に登録してみた

vcs

密かに Google Reader Full Feed Changer の siteinfo 登録管理に非常に役に立っていて(個人的に)、 その構築に使用した簡単 cgi mvc framework を登録してみた。たいしたものじゃないけど勉強もかねて。 http://github.com/basyura/gup/tree/master