how can i use rugged to create and commit a file like from the command line?
问题 i'm trying to use rugged to do something pretty simple: create and commit a file, leaving the repository in the same state as doing: git init echo "blah blah blah" > blah.txt git add blah.txt git commit -m "write blah.txt" which leaves git status printing On branch master nothing to commit, working directory clean i'm using code adapted from the rugged repo's readme, which boils down to: name = "blah.txt" repo = Rugged::Repository.init_at dir File.open File.join(dir, name), 'w' do |f| f.write