Written by Sean Behan on Sun Jun 17th 2012

Problem: using git and one file, like your db/schema.rb, is out of whack with the latest branch. If you run git pull and you get a failed merge and no update. You can of course, edit the conflicts manually. But what if you're confident that the latest schema.rb is correct? Instead of manually editing the file and doing all that work, you can grab the latest copy with the git checkout command.

Solution:  git checkout -- <file> ... or for the Rails application example above... git checkout -- db/schema.rb


Tagged with..
#development #Git #source control #Programming

Just finishing up brewing up some fresh ground comments...