Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKevin Egstorf
26,590 Pointstest-driven development versus Git
i was wondering is test-driven-development redundant when using a git repository? or do developers attend to use both when programming?
2 Answers
Maciej Czuchnowski
36,441 PointsThese are two completely separate and different things, I can't see how one makes the other redundant.
You use git to be able to go back to any point in your project, see changes, enable peer review, facilitate working with other developers and store a backup copy of your project somewhere. It also lets you do experiments with features on separate branches so that they don't interfere with the main working version.
TDD is a methodology where you first write tests and then the code that makes those tests pass. And you write them before implementing any new feature. In classic methodology you write tests after writing the feature or even after completing the whole project (depends if you're using Agile or Waterfall model). In the future those tests are used to document your application and you run them to check if any new changes broke something in the app (yes, this can as well be achieved by writing tests AFTER writing the code).
Kevin Egstorf
26,590 Pointscool and tnx for the explanation!