David Schwartz 426 Posted May 21, 2019 I got a strange compiler error while trying to build some newly updated Delphi code from a colleague -- it said there was an error in the use of a 16-bit resource in a file. Hmmm.... very strange. It turned out it was caused by annotations that git added to highlight merge conflicts during a commit. This is a snippet from one that I found in a DFM file. inherited pnlHelpDog: TPanel <<<<<<< HEAD Left = 1183 ======= Left = 1020 >>>>>>> 091477ff512cddd0288e69e330a1024cd0f011b5 TabOrder = 4 I'm wondering how others deal with this? Share this post Link to post
Stefan Glienke 2006 Posted May 21, 2019 (edited) Slap your coworker because he obviously did not resolve a conflict and just commited this (this is git 101). This is how git annotates the code when there is a conflict and usually you then call git mergetool (or similar) or just use the resolve conflict button in whatever git ui client you are using. Remove lines 2, 4 and 6 and decide if you want to keep 3 or 5 Edited May 21, 2019 by Stefan Glienke Share this post Link to post
David Schwartz 426 Posted May 21, 2019 at what point? Is this something that should be resolved during the commit / push process? I'm surprised to see these annotations in source code at all. Share this post Link to post
David Schwartz 426 Posted May 21, 2019 We have 3 people on our project and two are trying to use git as if it's TFS. I keep telling them they're not using it correctly, but they refuse to listen. They also only use the command-line interfaces. They won't use a GUI. I know they're heading for a train-crash, and this is the first evidence of it. Share this post Link to post
FredS 138 Posted May 21, 2019 21 minutes ago, David Schwartz said: this is the first evidence of it I often wonder how many issues in a mature product are actually the misuse of Version Control.. 2 Share this post Link to post
Stefan Glienke 2006 Posted May 21, 2019 Well if you are working with ignoramuses you have to get the bigger guns out and install some commit hooks to prevent them from committing unresolved conflicts. Google will help you finding out how that works. 1 1 Share this post Link to post
DiGi 14 Posted May 22, 2019 Another tip: Use https://andy.jgknet.de/blog/ide-tools/ddevextensions/ with option Remove Explicit* properties. And always check modified dfms before commit. Share this post Link to post
dummzeuch 1505 Posted May 22, 2019 17 hours ago, David Schwartz said: We have 3 people on our project and two are trying to use git as if it's TFS. I keep telling them they're not using it correctly, but they refuse to listen. They also only use the command-line interfaces. They won't use a GUI. It's not only git which uses this kind of annotations. svn and probably many other SCMs do too. So how can it be that somebody commits stuff like this? One option for dealing with this kind of stupidity is setting up a continous build server and slapping everybody who commits stuff that does not compile. But this requires somebody with authority to do the initial slapping. 1 Share this post Link to post
Guest Posted May 22, 2019 23 minutes ago, dummzeuch said: But this requires somebody with authority to do the initial slapping. In case of lack of authority, proceed with slapping until the desired level is achieved. 🙂 Share this post Link to post
Rollo62 536 Posted May 22, 2019 Its easy to build an automated "training device" with this Bluetooth stuff, RadServer for IoT, GIT and a CI-Server. https://www.amazon.com/PetSafe-Smart-Bluetooth-Training-Collar/dp/B01K73MUTI (If you google somewhat deeper you will find versions with high voltage electroshock too ). (I like to get one for myself sometimes, to get a shock whenever I did something wrong). 4 Share this post Link to post