Sha256: ab1389060c95913a2b8f73540a22499a94ffd87b969c8040a88021f75b49c7f9

Contents?: true

Size: 654 Bytes

Versions: 17

Compression:

Stored size: 654 Bytes

Contents

difficulty 2

description "A file (deleteme.rb) has accidentally been added to your staging area, find out which file and remove it from the staging area.  *NOTE* Do not remove the file system, only from git."

setup do
  repo.init(false)
  FileUtils.touch("deleteme.rb")
  repo.add(".gitignore")
  repo.add("deleteme.rb")
end

solution do
  (repo.status.files["deleteme.rb"].nil? || repo.status.files["deleteme.rb"].stage.nil?) && File.exists?("deleteme.rb")
end

hint do
  puts "You may need to use more than one command to complete this.  You have checked your staging area in a previous level.  Don't forget to run `git` for a list of commands."
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
githug-0.2.7 levels/rm_cached.rb
githug-0.2.6 levels/rm_cached.rb
githug-0.2.5 levels/rm_cached.rb
githug-0.2.4 levels/rm_cached.rb
githug-0.2.3 levels/rm_cached.rb
githug-0.2.2 levels/rm_cached.rb
githug-0.2.1 levels/rm_cached.rb
githug-0.2.0 levels/rm_cached.rb
githug-0.1.8 levels/rm_cached.rb
githug-0.1.7 levels/rm_cached.rb
githug-0.1.6 levels/rm_cached.rb
githug-0.1.5 levels/rm_cached.rb
githug-0.1.4 levels/rm_cached.rb
githug-0.1.3 levels/rm_cached.rb
githug-0.1.2 levels/rm_cached.rb
githug-0.1.1 levels/rm_cached.rb
githug-0.1.0 levels/rm_cached.rb