nelsonic / coedit

Starting from Scratch with Something Simple
1 stars 0 forks source link

How do we track the line-by-line evolution of a text file? #1

Open nelsonic opened 7 years ago

nelsonic commented 7 years ago

Imagine that you are collaboratively editing a text file (or group of files i.e. a "software project"!) and you want to track exactly the order in which the text was added so that you can create a "timeline" style of UI to display exactly when a line was added/updated.

This is possible with Git "blame" e.g: https://github.com/dwyl/learn-tdd/blame/master/README.md We can see who added each line: image

However if you look at the number of commits in the project: image

It's totally dwarfed by the number of lines: https://github.com/dwyl/learn-tdd/graphs/contributors image

That's actually a good thing, if we had a git commit for each line there would be thousands of them ...

Perhaps there's a different (but related) question to be asked/answered here: does it matter if your project has a lot of commits?

nelsonic commented 7 years ago

Searched for: https://www.google.pt/search?q=too+many+git+commits .then read a bunch of posts about git commits:

Initial conclusion: most people recommend/prefer (more) smaller commits to (fewer) large ones.

The obvious downside of having many commits is forcing "CI" to run each time costs resources...