git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to update Git's metadata without affecting working dir?
@ 2019-05-17 17:04 Rocky Ji
  2019-05-17 20:54 ` Philip Oakley
  0 siblings, 1 reply; 3+ messages in thread
From: Rocky Ji @ 2019-05-17 17:04 UTC (permalink / raw)
  To: git

I am working individually at the moment.
I have the habit of committing related changes on a regular basis, but
I push to GitLab only at the end of class session.

-------Events to reproduce the situation--------

Thursday, in school:
- `git clone https://gitlab.../my-repo`
- create a few .rst documentation files
- commit the above changes before I `git push -U origin master`

Friday, in school:
- start working on new feature, create a test file `test_A.rb`
- I commit the changes but forget to push

Sunday, **in home**:
- I `git clone https://gitlab.../my-repo`
- work on the exciting new feature that popped in my head, create `feature.rb`
- commit the changes before I `git push -U origin master`

Monday, in school:
- running `git status` shows `Your branch is ahead of 'origin/master'
by 1 commit.`

--------end problem reproduction----------------

Questions I have

1. What will happen if I follow Git's recommendation `use "git push"
to publish your local commits`?
2. How do I resolve this situation? I don't want loose any information
i.e. preserve `test_A.rb` and `feature.rb` along with their commit
messages and timestamps.
3. Why does Git assume that local-working-dir is "ahead" without
consulting the Gitlab server first?
4. How to make Git "consult" (but not mess the working-dir) GitLab
repo before starting my day's work?

Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to update Git's metadata without affecting working dir?
  2019-05-17 17:04 How to update Git's metadata without affecting working dir? Rocky Ji
@ 2019-05-17 20:54 ` Philip Oakley
       [not found]   ` <CAN2Gq-RNt2x-023qC2LWawYGUz5g08=oVK+ub4iLGnh90aQdyQ@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Oakley @ 2019-05-17 20:54 UTC (permalink / raw)
  To: Rocky Ji, git

This is a duplicate of a question on the Git Users list.

On 17/05/2019 18:04, Rocky Ji wrote:
> I am working individually at the moment.
> I have the habit of committing related changes on a regular basis, but
> I push to GitLab only at the end of class session.
>
> -------Events to reproduce the situation--------
>
> Thursday, in school:
> - `git clone https://gitlab.../my-repo`
> - create a few .rst documentation files
> - commit the above changes before I `git push -U origin master`
>
> Friday, in school:
> - start working on new feature, create a test file `test_A.rb`
> - I commit the changes but forget to push
>
> Sunday, **in home**:
> - I `git clone https://gitlab.../my-repo`
> - work on the exciting new feature that popped in my head, create `feature.rb`
> - commit the changes before I `git push -U origin master`
>
> Monday, in school:
> - running `git status` shows `Your branch is ahead of 'origin/master'
> by 1 commit.`
>
> --------end problem reproduction----------------
>
> Questions I have
>
> 1. What will happen if I follow Git's recommendation `use "git push"
> to publish your local commits`?
> 2. How do I resolve this situation? I don't want loose any information
> i.e. preserve `test_A.rb` and `feature.rb` along with their commit
> messages and timestamps.
> 3. Why does Git assume that local-working-dir is "ahead" without
> consulting the Gitlab server first?
> 4. How to make Git "consult" (but not mess the working-dir) GitLab
> repo before starting my day's work?
>
> Thank you.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to update Git's metadata without affecting working dir?
       [not found]   ` <CAN2Gq-RNt2x-023qC2LWawYGUz5g08=oVK+ub4iLGnh90aQdyQ@mail.gmail.com>
@ 2019-05-18  8:29     ` Rocky Ji
  0 siblings, 0 replies; 3+ messages in thread
From: Rocky Ji @ 2019-05-18  8:29 UTC (permalink / raw)
  To: Philip Oakley; +Cc: git

Hi Philip Oakley,

Minor correction: the Google groups question is a duplicate of this &
not the other way around.

My first mail to git[at]vger.kernel.org got rejected, claiming some
virus reason (I don't even know C or OS basics, server is just blaming
me). So I reposted it from live-ubuntu machine; I was afraid my
question would never show up on mailing list.

Also git-scm site says this mailing list is for bug reports also. I
was afraid my question would be ignored as trivial.

Because of those doubts, I duplicated it on
git-users[at]googlegroups.com, I had no intention to spam this awesome
group.

Thank You.

On Sat, May 18, 2019 at 5:42 AM Rocky Ji <rockyji3438@gmail.com> wrote:
>
> Hi Philip Oakley,
>
> Minor correction: the Google groups question is a duplicate of this & not the other way around.
>
> 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.
>
> And git-scm site said this mailing list is for bug reports also. I was afraid my question would be ignored as trivial.
>
> Because of those doubts, I duplicated it on git-users[at]googlegroups.com
>
> On Sat, May 18, 2019, 02:24 Philip Oakley <philipoakley@iee.org> wrote:
>>
>> This is a duplicate of a question on the Git Users list.
>>
>> On 17/05/2019 18:04, Rocky Ji wrote:
>> > I am working individually at the moment.
>> > I have the habit of committing related changes on a regular basis, but
>> > I push to GitLab only at the end of class session.
>> >
>> > -------Events to reproduce the situation--------
>> >
>> > Thursday, in school:
>> > - `git clone https://gitlab.../my-repo`
>> > - create a few .rst documentation files
>> > - commit the above changes before I `git push -U origin master`
>> >
>> > Friday, in school:
>> > - start working on new feature, create a test file `test_A.rb`
>> > - I commit the changes but forget to push
>> >
>> > Sunday, **in home**:
>> > - I `git clone https://gitlab.../my-repo`
>> > - work on the exciting new feature that popped in my head, create `feature.rb`
>> > - commit the changes before I `git push -U origin master`
>> >
>> > Monday, in school:
>> > - running `git status` shows `Your branch is ahead of 'origin/master'
>> > by 1 commit.`
>> >
>> > --------end problem reproduction----------------
>> >
>> > Questions I have
>> >
>> > 1. What will happen if I follow Git's recommendation `use "git push"
>> > to publish your local commits`?
>> > 2. How do I resolve this situation? I don't want loose any information
>> > i.e. preserve `test_A.rb` and `feature.rb` along with their commit
>> > messages and timestamps.
>> > 3. Why does Git assume that local-working-dir is "ahead" without
>> > consulting the Gitlab server first?
>> > 4. How to make Git "consult" (but not mess the working-dir) GitLab
>> > repo before starting my day's work?
>> >
>> > Thank you.
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-18  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17 17:04 How to update Git's metadata without affecting working dir? Rocky Ji
2019-05-17 20:54 ` Philip Oakley
     [not found]   ` <CAN2Gq-RNt2x-023qC2LWawYGUz5g08=oVK+ub4iLGnh90aQdyQ@mail.gmail.com>
2019-05-18  8:29     ` Rocky Ji

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).