How To See The Git Blame View In XCode

I really hate the term “git blame”. It makes it sound like I want to blame someone for their code, when in reality I use it to see who wrote the code so I can ask them questions about it or consult them on how to best implement a feature or bug using the existing code. Anyway, that’s besides the point.

If you’re working in a team bigger than two, you will likely need to know who wrote the code you’re working on at some point so you can ask them a question if they’re still there.

When I first started working as an iOS developer, I ended up finding a the file I had a question about on Github and seeing the git blame view in there. But, as one of my co-workers showed me, there is a way to do that directly in XCode, which is a lot more convenient.

Here is how:

Screen Shot 2013-08-02 at 8.36.46 AM

Simply go the “View” in the XCode navigation menu, select “Version Editor, then select “Show Blame View”. Now, on the left hand side, you’ll see the last commits line-by-line:

Screen Shot 2013-08-02 at 8.41.02 AM

Once, you’re done, simply click the one-view Editor button to get back to your original coding view:

Screen Shot 2013-08-02 at 8.43.29 AM

Happy blaming!

Enjoy the article? Join over 14,500+ Swift developers and enthusiasts who get my weekly updates.

  • TJ

    So it’s final project demo day at DBC-Chicago and we’re sitting discussing the past 9 weeks chuckled at the fact that you’re basically like a DBC celebrity to us. Thanks for blogging about your experiences and inspiring us!

    • Haha… Did I get to meet you when I came to visit? It was just the very first DBC Chicago cohort there when I stopped. Happy I could help 🙂

  • Rachel Logie

    Hi Natasha… I was reading something you wrote, you said “I still remember the point when it all made sense.” When was that, like how long had you been trying to program? Did you work another job while learning to program (prior to Dev Bootcamp) or did you devote yourself to it full time? I am a woman in her 20s learning to code on my own, so I am super interested in your experience!!!

    • Hi Rachel,

      It took me about 6 months to get that feeling! I was working at a startup when I was learning to code, and since the startup was failing, I had a bit more time to spend on learning to code, but it wasn’t full time.

      November / December was the most productive, because I used all the holiday days to finish the Stanford course. Even now, with a full-time job, I just wake up early so I can code at least 2 hours before work, and work all weekend. It’s definitely not easy, but it can be done if you make this a priority in your life.