Sha256: d6226a0d6849aa19c5a8ec6ece50f0701c1734897ba2398bddb3542fc7d26d1f

Contents?: true

Size: 781 Bytes

Versions: 14

Compression:

Stored size: 781 Bytes

Contents

difficulty 4
description "You have committed several times but would like all those changes to be one commit"

setup do
  repo.init
  FileUtils.touch(".hidden")
  repo.add("hidden")
  repo.commit_all("Initial Commit")
  FileUtils.touch("README")
  repo.add("README")
  repo.commit_all("Adding README")
  File.open("README", 'w') { |f| f.write("hey there") }
  repo.add("README")
  repo.commit_all("Updating README")
  File.open("README", 'a') { |f| f.write("\nAdding some more text") }
  repo.add("README")
  repo.commit_all("Updating README")
  File.open("README", 'a') { |f| f.write("\neven more text") }
  repo.add("README")
  repo.commit_all("Updating README")
end

solution do
  repo.commits.length == 2
end

hint do
  puts "Take a look the -i flag of the rebase command"
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
githug-0.3.3 levels/squash.rb
githug-0.3.2 levels/squash.rb
githug-0.3.1 levels/squash.rb
githug-0.3.0 levels/squash.rb
githug-0.2.12 levels/squash.rb
githug-0.2.11 levels/squash.rb
githug-0.2.10 levels/squash.rb
githug-0.2.9 levels/squash.rb
githug-0.2.8 levels/squash.rb
githug-0.2.7 levels/squash.rb
githug-0.2.6 levels/squash.rb
githug-0.2.5 levels/squash.rb
githug-0.2.4 levels/squash.rb
githug-0.2.3 levels/squash.rb