Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sounds like you've never worked on a project with a file everyone wants to append to :)

If every error in your system needs a separate entry in the error enum, or every change needs an entry in the changelog - loads of changes will try to modify the last line of the file.



Even multiple appends are not that bad for rebasing - if you put the remote changes before your own then after the first commit the context for your remaining commits will be the same.

If order actually matters then yeah, git can't magically know where each new line should go.


Oh, I have. :-)

I'm not saying these situations are impossible. But you can work towards reducing when they arise. If everyone needs to change the same file, then it sounds like something should be refactored (it's probably a quite big file as well?).

If every error needs to go to the same error enum, that sounds like an error enum that might benefit from being split up.

And if every change needs to write to a common changelog file, I would personally find a new way to produce that changelog.

If it's that big a painpoint, then I would look into different ways to get around it.


Depending on the format of your files, entries like "changelog merge=union" in your .gitattributes file might work for you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: