Sha256: 06a3919946ce344e0bd56ffd2f56d186e3b5b03583613d0389c6f388eb3ee19f
Contents?: true
Size: 635 Bytes
Versions: 22
Compression:
Stored size: 635 Bytes
Contents
difficulty 3 description "A file has been modified, but you don't want to keep the modification. Checkout the `config.rb` file from the last commit." setup do repo.init File.open("config.rb", "w") do |file| file.puts("This is the initial config file") end repo.add("config.rb") repo.commit_all("Added initial config file") File.open("config.rb", "a") do |file| file.puts("These are changed you don't want to keep!") end end solution do repo.status.files["config.rb"].type != "M" && repo.commits.length == 1 end hint do puts "You will need to do some research on the checkout command for this one." end
Version data entries
22 entries across 22 versions & 2 rubygems