{"thread":{"id":"55683","subject":"[RFC doc] Tracking git.git","startedAt":"2021-05-13T13:05:57Z","lastAt":"2021-05-13T22:48:03Z","messageCount":4,"participants":["Bagas Sanjaya","dwh@linuxprogrammer.org","Junio C Hamano","Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"424467","messageId":"4591b3bd-1f35-55cb-6eb0-be97810d6e68@gmail.com","threadId":"55683","inReplyTo":null,"subject":"[RFC doc] Tracking git.git","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-05-13T13:05:43Z","receivedAt":"2021-05-13T13:05:57Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"Hi,\n\nSome people (most notably Git developers here and me) like to run Git\ncompiled from git.git repository, as opposed to normal users that run\neither Git from distribution or compiled from official source tarball.\n\nIn git.git repo, besides master, there is also next, seen, and maint\nbranches. The purposes of these branches are described on\nDocumentation/howto/maintain-git.txt.\n\nWhen we have git.git repo clone and track it, tracking master, next,\nand maint are easy peasy: git pull will do the job. But tracking seen\nis more like tracking linux-next. We do NOT use git pull because\noften doing so will try to merge origin (upstream) with our local\nversion, which are divergent and most likely will end with conflict.\nInstead, we do git fetch first followed by resetting to upstream by\ngit reset --hard origin/seen.\n\nShould the fact above be documented? And on what file the fact should\nbe placed? In INSTALL?\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"424475","messageId":"20210513144930.GC11882@localhost","threadId":"55683","inReplyTo":"4591b3bd-1f35-55cb-6eb0-be97810d6e68@gmail.com","subject":"Re: [RFC doc] Tracking git.git","fromName":"","fromEmail":"dwh@linuxprogrammer.org","sentAt":"2021-05-13T14:49:30Z","receivedAt":"2021-05-13T14:51:59Z","isPatch":false,"sender":{"key":"dwh@linuxprogrammer.org","avatar":null},"body":"On 13.05.2021 20:05, Bagas Sanjaya wrote:\n>But tracking seen is more like tracking linux-next. We do NOT use git\n>pull because often doing so will try to merge origin (upstream) with\n>our local version, which are divergent and most likely will end with\n>conflict.  Instead, we do git fetch first followed by resetting to\n>upstream by git reset --hard origin/seen.\n>\n>Should the fact above be documented? And on what file the fact should\n>be placed? In INSTALL?\n\nI vote yes. I was trying out tracking the different branches and got\nbitten by this very situation (tons of conflicts) when pulling seen.\n\nCheers!\nDave\n"},{"id":"424504","messageId":"xmqq5yzmbdfl.fsf@gitster.g","threadId":"55683","inReplyTo":"20210513144930.GC11882@localhost","subject":"Re: [RFC doc] Tracking git.git","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-05-13T20:12:46Z","receivedAt":"2021-05-13T20:12:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"dwh@linuxprogrammer.org writes:\n\n> On 13.05.2021 20:05, Bagas Sanjaya wrote:\n>>But tracking seen is more like tracking linux-next. We do NOT use git\n>>pull because often doing so will try to merge origin (upstream) with\n>>our local version, which are divergent and most likely will end with\n>>conflict.  Instead, we do git fetch first followed by resetting to\n>>upstream by git reset --hard origin/seen.\n>>\n>>Should the fact above be documented? And on what file the fact should\n>>be placed? In INSTALL?\n>\n> I vote yes. I was trying out tracking the different branches and got\n> bitten by this very situation (tons of conflicts) when pulling seen.\n\nI vote checking for existing docs before doing this, though.  I\nwould be surprised if we do not say \"do not build on (fork from)\n'seen' (formerly known as 'pu')\".\n"},{"id":"424523","messageId":"609dac9c16814_42a020839@natae.notmuch","threadId":"55683","inReplyTo":"20210513144930.GC11882@localhost","subject":"Re: [RFC doc] Tracking git.git","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2021-05-13T22:47:56Z","receivedAt":"2021-05-13T22:48:03Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"dwh@ wrote:\n> On 13.05.2021 20:05, Bagas Sanjaya wrote:\n> >But tracking seen is more like tracking linux-next. We do NOT use git\n> >pull because often doing so will try to merge origin (upstream) with\n> >our local version, which are divergent and most likely will end with\n> >conflict.  Instead, we do git fetch first followed by resetting to\n> >upstream by git reset --hard origin/seen.\n> >\n> >Should the fact above be documented? And on what file the fact should\n> >be placed? In INSTALL?\n> \n> I vote yes. I was trying out tracking the different branches and got\n> bitten by this very situation (tons of conflicts) when pulling seen.\n\ngit pull is evil.\n\nFor more than a decade we've had unending debates about how to fix it,\nand nothing comes out of them (last one being [1]).\n\nJust don't use it, and tell your friends to not use it.\n\nAlways do `git fetch` plus either one of these:\n\n 1. git merge --ff-only\n 2. git rebase\n 3. git merge --no-ff\n 4. git reset --hard @{upstream}\n\nCheers.\n\n[1] https://lore.kernel.org/git/20201208002648.1370414-1-felipe.contreras@gmail.com/\n\n-- \nFelipe Contreras\n"}]}