{"thread":{"id":"51115","subject":"How to update Git's metadata without affecting working dir?","startedAt":"2019-05-17T17:03:47Z","lastAt":"2019-05-18T08:28:27Z","messageCount":3,"participants":["Rocky Ji","Philip Oakley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"375806","messageId":"CAN2Gq-Rb3v8-8PKmKUGKJ3wP-UvAF2n59a9UGbtjiGibE8q=zg@mail.gmail.com","threadId":"51115","inReplyTo":null,"subject":"How to update Git's metadata without affecting working dir?","fromName":"Rocky Ji","fromEmail":"rockyji3438@gmail.com","sentAt":"2019-05-17T17:04:31Z","receivedAt":"2019-05-17T17:03:47Z","isPatch":false,"sender":{"key":"rockyji3438@gmail.com","avatar":null},"body":"I am working individually at the moment.\nI have the habit of committing related changes on a regular basis, but\nI push to GitLab only at the end of class session.\n\n-------Events to reproduce the situation--------\n\nThursday, in school:\n- `git clone https://gitlab.../my-repo`\n- create a few .rst documentation files\n- commit the above changes before I `git push -U origin master`\n\nFriday, in school:\n- start working on new feature, create a test file `test_A.rb`\n- I commit the changes but forget to push\n\nSunday, **in home**:\n- I `git clone https://gitlab.../my-repo`\n- work on the exciting new feature that popped in my head, create `feature.rb`\n- commit the changes before I `git push -U origin master`\n\nMonday, in school:\n- running `git status` shows `Your branch is ahead of 'origin/master'\nby 1 commit.`\n\n--------end problem reproduction----------------\n\nQuestions I have\n\n1. What will happen if I follow Git's recommendation `use \"git push\"\nto publish your local commits`?\n2. How do I resolve this situation? I don't want loose any information\ni.e. preserve `test_A.rb` and `feature.rb` along with their commit\nmessages and timestamps.\n3. Why does Git assume that local-working-dir is \"ahead\" without\nconsulting the Gitlab server first?\n4. How to make Git \"consult\" (but not mess the working-dir) GitLab\nrepo before starting my day's work?\n\nThank you.\n"},{"id":"375829","messageId":"b3e170ed-ca5f-c754-892a-d11d4b71d989@iee.org","threadId":"51115","inReplyTo":"CAN2Gq-Rb3v8-8PKmKUGKJ3wP-UvAF2n59a9UGbtjiGibE8q=zg@mail.gmail.com","subject":"Re: How to update Git's metadata without affecting working dir?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2019-05-17T20:54:21Z","receivedAt":"2019-05-17T20:54:25Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"This is a duplicate of a question on the Git Users list.\n\nOn 17/05/2019 18:04, Rocky Ji wrote:\n> I am working individually at the moment.\n> I have the habit of committing related changes on a regular basis, but\n> I push to GitLab only at the end of class session.\n>\n> -------Events to reproduce the situation--------\n>\n> Thursday, in school:\n> - `git clone https://gitlab.../my-repo`\n> - create a few .rst documentation files\n> - commit the above changes before I `git push -U origin master`\n>\n> Friday, in school:\n> - start working on new feature, create a test file `test_A.rb`\n> - I commit the changes but forget to push\n>\n> Sunday, **in home**:\n> - I `git clone https://gitlab.../my-repo`\n> - work on the exciting new feature that popped in my head, create `feature.rb`\n> - commit the changes before I `git push -U origin master`\n>\n> Monday, in school:\n> - running `git status` shows `Your branch is ahead of 'origin/master'\n> by 1 commit.`\n>\n> --------end problem reproduction----------------\n>\n> Questions I have\n>\n> 1. What will happen if I follow Git's recommendation `use \"git push\"\n> to publish your local commits`?\n> 2. How do I resolve this situation? I don't want loose any information\n> i.e. preserve `test_A.rb` and `feature.rb` along with their commit\n> messages and timestamps.\n> 3. Why does Git assume that local-working-dir is \"ahead\" without\n> consulting the Gitlab server first?\n> 4. How to make Git \"consult\" (but not mess the working-dir) GitLab\n> repo before starting my day's work?\n>\n> Thank you.\n\n"},{"id":"375843","messageId":"CAN2Gq-TvGATQ_Nn1UDVgf4MxKeY83BDPNHdiOQiqSiETevQeZQ@mail.gmail.com","threadId":"51115","inReplyTo":"CAN2Gq-RNt2x-023qC2LWawYGUz5g08=oVK+ub4iLGnh90aQdyQ@mail.gmail.com","subject":"Re: How to update Git's metadata without affecting working dir?","fromName":"Rocky Ji","fromEmail":"rockyji3438@gmail.com","sentAt":"2019-05-18T08:29:11Z","receivedAt":"2019-05-18T08:28:27Z","isPatch":false,"sender":{"key":"rockyji3438@gmail.com","avatar":null},"body":"Hi Philip Oakley,\n\nMinor correction: the Google groups question is a duplicate of this &\nnot the other way around.\n\nMy first mail to git[at]vger.kernel.org got rejected, claiming some\nvirus reason (I don't even know C or OS basics, server is just blaming\nme). So I reposted it from live-ubuntu machine; I was afraid my\nquestion would never show up on mailing list.\n\nAlso git-scm site says this mailing list is for bug reports also. I\nwas afraid my question would be ignored as trivial.\n\nBecause of those doubts, I duplicated it on\ngit-users[at]googlegroups.com, I had no intention to spam this awesome\ngroup.\n\nThank You.\n\nOn Sat, May 18, 2019 at 5:42 AM Rocky Ji <rockyji3438@gmail.com> wrote:\n>\n> Hi Philip Oakley,\n>\n> Minor correction: the Google groups question is a duplicate of this & not the other way around.\n>\n> My first mail to git[at]vger.kernel.org got rejected, claiming some virus reason (I don't even know C or OS basics). After reposting; I was afraid my question would never show up on mailing list.\n>\n> And git-scm site said this mailing list is for bug reports also. I was afraid my question would be ignored as trivial.\n>\n> Because of those doubts, I duplicated it on git-users[at]googlegroups.com\n>\n> On Sat, May 18, 2019, 02:24 Philip Oakley <philipoakley@iee.org> wrote:\n>>\n>> This is a duplicate of a question on the Git Users list.\n>>\n>> On 17/05/2019 18:04, Rocky Ji wrote:\n>> > I am working individually at the moment.\n>> > I have the habit of committing related changes on a regular basis, but\n>> > I push to GitLab only at the end of class session.\n>> >\n>> > -------Events to reproduce the situation--------\n>> >\n>> > Thursday, in school:\n>> > - `git clone https://gitlab.../my-repo`\n>> > - create a few .rst documentation files\n>> > - commit the above changes before I `git push -U origin master`\n>> >\n>> > Friday, in school:\n>> > - start working on new feature, create a test file `test_A.rb`\n>> > - I commit the changes but forget to push\n>> >\n>> > Sunday, **in home**:\n>> > - I `git clone https://gitlab.../my-repo`\n>> > - work on the exciting new feature that popped in my head, create `feature.rb`\n>> > - commit the changes before I `git push -U origin master`\n>> >\n>> > Monday, in school:\n>> > - running `git status` shows `Your branch is ahead of 'origin/master'\n>> > by 1 commit.`\n>> >\n>> > --------end problem reproduction----------------\n>> >\n>> > Questions I have\n>> >\n>> > 1. What will happen if I follow Git's recommendation `use \"git push\"\n>> > to publish your local commits`?\n>> > 2. How do I resolve this situation? I don't want loose any information\n>> > i.e. preserve `test_A.rb` and `feature.rb` along with their commit\n>> > messages and timestamps.\n>> > 3. Why does Git assume that local-working-dir is \"ahead\" without\n>> > consulting the Gitlab server first?\n>> > 4. How to make Git \"consult\" (but not mess the working-dir) GitLab\n>> > repo before starting my day's work?\n>> >\n>> > Thank you.\n>>\n"}]}