Sha256: 39e7067b5bade6d2116890b18f901f0aa5db4e105cd2b918896159424a1f7078

Contents?: true

Size: 579 Bytes

Versions: 2

Compression:

Stored size: 579 Bytes

Contents

difficulty 2
description "The README file has been committed, but it looks like the file `forgotten_file.rb` was missing from the commit.  Add the file and amend your previous commit to include it."

setup do
  repo.init
  FileUtils.touch("README")
  repo.add("README")
  repo.commit_all("Initial commit")
  FileUtils.touch("forgotten_file.rb")
end

solution do
		
  repo.commits.length == 1 && Grit::CommitStats.find_all(repo, repo.commits.first.sha).first[1].files.length == 2
end

hint do
  puts "Running `git commit --help` will display the man page and possible flags."
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
githug-0.2.5 levels/commit_ammend.rb
githug-0.2.4 levels/commit_ammend.rb