Sha256: 57519043292bf2a23d84e21ab5ee8b8fe32a50ca7bed7f40fb182409cfb55987
Contents?: true
Size: 723 Bytes
Versions: 1
Compression:
Stored size: 723 Bytes
Contents
difficulty 2 description "The text editor 'vim' creates files ending in `.swp` (swap files) for all files that are currently open. We don't want them creeping into the repository. Make this repository ignore those swap files which are ending in `.swp`." setup do repo.init FileUtils.touch("README.swp") system "git branch -m master" file = File.open(".git/config", "w") do |file| file.puts "[core]\nexcludesfile=" end end solution do valid = false File.open(".gitignore", "r") do |file| while line = file.gets if line.chomp == "*.swp" valid = true end end end valid end hint do puts "You may have noticed there is a file named `.gitignore` in the repository." end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
githug-0.5.1 | levels/ignore.rb |