Sha256: 61962b10884117ac42159d288f536d4d2b13c7229c88c5a9835ff9352fbd2057

Contents?: true

Size: 647 Bytes

Versions: 14

Compression:

Stored size: 647 Bytes

Contents

difficulty 2

description "A file 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 from the file system, only from git."

setup do
  repo.init
  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

14 entries across 14 versions & 2 rubygems

Version Path
mygithug-0.5.1 levels/rm_cached.rb
githug-0.5.0 levels/rm_cached.rb
githug-0.4.8 levels/rm_cached.rb
githug-0.4.7 levels/rm_cached.rb
githug-0.4.6 levels/rm_cached.rb
githug-0.4.5 levels/rm_cached.rb
githug-0.4.4 levels/rm_cached.rb
githug-0.4.3 levels/rm_cached.rb
githug-0.4.2 levels/rm_cached.rb
githug-0.4.1 levels/rm_cached.rb
githug-0.4.0 levels/rm_cached.rb
githug-0.3.5 levels/rm_cached.rb
githug-0.3.4 levels/rm_cached.rb
githug-0.3.3 levels/rm_cached.rb