git

git log から1年間の変更行数の合計を取得する (結果も書いてみた)

リポジトリ全体 git log --follow --stat --after=2013-01-01 --before=2014-01-01 . | grep insertions | awk '{ins+=$4;del+=$6} END{print ins,del,(ins-del)}' 特定のファイル .vimrc でやってみる。 git log --follow --stat --after=2013-01-01 --befo…

git push --force が弾かれる

git

サーバ側の receive.denyNonFastforwards を false にすればみたい。 そもそも、そんなことするなって話だけど。 http://progit.org/book/ja/ch7-1.html めったにやるものではないので、用がすんだら戻した。

リモートレポジトリを作るスクリプト

git

git-make-remote-repository /foo/git/my-remote-repos.git で、適当に設定&レポジトリ作成してくれます。

.gitignore がリポジトリに既に有る場合の個人的な無視設定

リポジトリ内に既に、 .gitignore が有るんだけれど個人的な無視設定も欲しい場合は、 ./.git/info/exclude に書く git help ignore

mercurial で git rebase hoge をする

rebase extension を有効にするために、.hgrc の extensions 節に "rebase =" を追加する。 [extensions] rebase =あとは、コマンド一発。 git rebase origin master みたいにしたいときは、いじりたいブランチの上に行った上で hg rebase --dest origin --b…

リモートリポジトリをあとから作る

cd remote-repos-path git init --bare --shared=true cd local-repos-path git remote add origin remote-repos-path git config branch.master.merge refs/heads/master git config branch.master.remote origin git push origin master git pull 参考リン…

git on cygwin

cygwin 1.7.1 で UTF-8 対応記念的な、cygwin と git 辺りのメモ。 cygwin 環境変数を CYGWIN="binmode tty" (tty は gitk で問題がでるとかでないとか?) git ~/.gitconfig core の辺りは面倒ごとになりやすいので重要 [user] name = anekos email = anekos…

hg への移行メモ

まだ、ソースコードみるくらいしかしていないけれど… とりあえず、気づいたところだけでもメモ。 git pull hg pull --update or hg pull hg update git show da9c0a1a532d hg export da9c0a1a532d git blame PATH hg blame -c PATH c をつけないとローカルな…

この特集よかよ

Git

特集2 ブランチもマージも簡単な分散型バージョン管理システム はじめてのGitGitギットは,LinuxカーネルやRuby on Railsのプロジェクトでも使われている,オープンソースのバージョン管理システムです。分散型バージョン管理システムであるGitは,集中型の…

coderepos に git のレポジトリを作ってみた!

AnkPixivTools を突っ込んでみるテスト! というわけで、実行手順。 1 - .netrc を書く plase ~/.netrc file for committers$ cat ~/.netrc machine git.coderepos.org login YOURID password YOURPASSWORD "plaSe ~/.netrc" とか書いてあるので、 machine g…

Git のサブコマンドのエイリアス

Git

gitの場合は git checkout . とか打たなきゃならない。coって略せないcheckoutとか打つ気にならない。ドットとかもタイプしたくない。 co ってかけないのは確かにめんどい。 しかし、 ~/.gitconfig に alias の設定書いたりもできる。 [alias] co = checkout…

git の便利なお友達

Git

tig ncurses 使ったインターフェイスを提供してくれる。 "/" で検索も出来たりしてログ見るのに便利ー。 gitk tk を使ってグラフィカルに見られる。マージの様子とかがわかりやすい。 Windows の亀シリーズはあるのかな? tortoisegit あった http://code.go…

git-svn が死ぬ

Git

ので、 http://rctay.spaces.live.com/Blog/cns!59D3BFCD027B09E5!792.entry のパッチ当てた。 結構時間かかるなぁ。