Skip to content

Instantly share code, notes, and snippets.

@levinotik
Created March 2, 2012 04:21
Show Gist options
  • Save levinotik/1955600 to your computer and use it in GitHub Desktop.
Save levinotik/1955600 to your computer and use it in GitHub Desktop.
repo = Repo.init_bare("public/git/myrepo.git")
fname = Time.now.to_i.to_s
File.open("public/git/" + fname, 'w') {|f| f.write('hello git' + fname)}
repo.add(fname)
repo.commit_index('my commit')
logger.info repo.commits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment