1) Gather your supplies. Caffeine, chocolate, clementines, instant oatmeal, peanut butter packs, fluffy socks, warm sweaters, noise canceling headphones. Whatever you need to stay awake, happy, and motivated in order to push through this last long haul.
2) Prepare your battle room. In other words, clean up your workspace. Make it comfy, make it clean, make it open, make it well-lighted. You'll be spending much of your time here. It also might be easier to work outside your dorm room (in the case of college students), where you can get tempted by your oh-so-comfy bed. Changing scenery helps productivity.
3) Draw up a plan of attack. Set aside a time each day to force yourself to write - this means everyday, whether or not you "feel like it". Set daily goals and mini-deadlines for yourself. I get a thrill crossing off items on my to-do list so I find that a bunch of smaller deadlines helps me stay on track. But figure out what works best for you.
4) Cut off communication. Turn off your wifi, turn off your cell phone, put a big "ANGRY THESIS STUDENT INSIDE" sign on your door, and turn on some Beethoven. But really, put down the phone, stop texting, exit Pinterest, no more Words With Friends, and you really need to stop stalking his Facebook wall. This is Words With My Thesis time.
5) Have a back up plan. Back your thesis up on a harddrive. Stay flexible when things don't go according to plan. Think of ways to creatively use what you have in order to make it work.
6) Move out. Daily. With huge projects, it's really easy to get stuck in "sitting inside all day slaving away at thesis work" mode, which can quickly turn into "I haven't seen the sun in three days and am only 80% sure today is Tuesday." Get outside, do at least a half hour of rigorous exercise everyday. Make sure you're still showering and brushing your teeth. Wash your face. Change your clothes occasionally and use deodorant always.
7) Operation Sanity Preservation is a go.
(These guidelines also apply for other types of large projects, exams, papers, etc. Hope this helps!)