git

diffをファイルに書き出し

commitのdiffをgrepしたいのだが、gitだけで検索する方法がわからなかったのでとりあえず~/diffに全commitのdiffを書きだした mkdir ~/diff git log | grep '^commit' | ruby -lane 'puts $F[1].strip' | ruby -lane 'arr=ARGF.to_a.map{|i|i.strip}; for i …

ある日付のcommitのIDだけ抜き出す

git-id-date.rb #!/usr/bin/env ruby require 'date' if ARGV.size < 1 STDERR.puts "ruby #{$0} 2011-08-15" STDERR.puts "ruby #{$0} 2011-08-15 2011-09-30" exit 1 end date_start = Date.parse(ARGV.shift) date_end = ARGV.empty? ? Date.today : Date…

リポジトリに入っているファイルの一覧

git

git log --pretty=format: --name-only | sort | uniq面倒くさい

git pushできない

pushするとこんなエラーが出る error: refusing to update checked out branch: refs/heads/master error: By default, updating the current branch in a non-bare repository error: is denied, because it will make the index and work tree inconsisten…

PSoC Designer5用.gitignore

*/*/lib/obj */*/obj */*/output BuildMsg.txt *.log *.lock *~ *.bak *.pdb Thumbs.db *.a *.o *#*リポジトリ内に複数PSoCプロジェクト置く場合はこうかな */*/*/lib/obj */*/*/obj */*/*/output BuildMsg.txt *.log *.lock *~ *.bak *.pdb Thumbs.db *.a *…

さくらにgitwebインストール

さくらサーバスタンダードプランにgitwebをインストール こうなった http://shokai.org/projects/git/ githubに置きたくないリポジトリをwebで見せたい時なんかに使う予定 これをさくらでやるgitリポジトリをhttpで公開する - 橋本詳解 基本的に変わらないの…

Windowsでgit/githubを使う設定

参考:CygwinでGit(GitHub)を始めるための準備・設定メモ - Rewish 既にMacでgitとgithubを使っているので、tortoise gitは使わずmsysgitのbash shellだけで使う。msysgitにbashとopensshが付いてくるのでcygwinもいらない。 まずmsysgitインストールする ht…

gitリポジトリをhttpで公開する

githubで公開したくないけど、httpでリポジトリを見れるようにしたい事がある。プライベートなプロジェクトだったり、ファイルサイズが巨大だったり。そういう時gitweb.cgiを使う。 こういう風にgitwebでリポジトリを公開したい http://git.kernel.org/ 参考…

gitインストール

さくらレンタルサーバースタンダードプランにインストール http://d.hatena.ne.jp/keisukefukuda/20080520/p1 wget http://kernel.org/pub/software/scm/git/git-1.6.3.tar.gz tar -zxvf git-1.6.3.tar.gz cd git-1.6.3/ ./configure --prefix=$HOME/local/g…

ginatraインストール

これ http://github.com/lenary/ginatra/tree/master sinatraを使ったgitリポジトリブラウザらしい sudo gem sources -a http://gems.github.com sudo gem install grit kematzy-sinatra-cache sudo gem install rspec webrat rack-test cucumbergit clone g…