POV-Ray : Newsgroups : povray.off-topic : I cannot update my GitHub repo Server Time
22 Dec 2024 01:14:03 EST (-0500)
  I cannot update my GitHub repo (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Cousin Ricky
Subject: I cannot update my GitHub repo
Date: 15 Feb 2022 16:45:00
Message: <web.620c1e89db05661160e0cc3d949c357d@news.povray.org>
Getting back to what I was trying to do before my GPG key expired, I cannot push
an update.  This is what I get:

----------[BEGIN TERMINAL SESSION]----------
ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git push origin main
To github.com:CousinRicky/POV-AndroidRobot.git
 ! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'github.com:CousinRicky/POV-AndroidRobot.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git pull origin main
From github.com:CousinRicky/POV-AndroidRobot
 * branch            main       -> FETCH_HEAD
Already up to date.
ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git push origin main
To github.com:CousinRicky/POV-AndroidRobot.git
 ! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'github.com:CousinRicky/POV-AndroidRobot.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
-----------[END TERMINAL SESSION]-----------

If a pull is saying it's up to date, why does a push say it's not?

I looked at the note about fast-forwards.  I saw words, I saw letters, but I
could not make it make any meaningful sense to me.

I might as well have been reading Sanskrit.

Help!


Post a reply to this message

From: Dick Balaska
Subject: Re: I cannot update my GitHub repo
Date: 15 Feb 2022 17:22:14
Message: <620c2796$1@news.povray.org>
On 2/15/2022 4:43 PM, Cousin Ricky wrote:

> ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git pull origin main
>  From github.com:CousinRicky/POV-AndroidRobot
>   * branch            main       -> FETCH_HEAD
> Already up to date.
> ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git push origin main
> To github.com:CousinRicky/POV-AndroidRobot.git
>   ! [rejected]        main -> main (non-fast-forward)
> error: failed to push some refs to 'github.com:CousinRicky/POV-AndroidRobot.git'

Try just "git pull" and "git push".
Also what does "git status" have to say?

dik


Post a reply to this message

From: Cousin Ricky
Subject: Re: I cannot update my GitHub repo
Date: 15 Feb 2022 17:55:00
Message: <web.620c2e2ecfbdaf8660e0cc3d949c357d@news.povray.org>
Dick Balaska <dic### [at] buckosoftcom> wrote:
> On 2/15/2022 4:43 PM, Cousin Ricky wrote:
>
> > ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git pull origin main
> >  From github.com:CousinRicky/POV-AndroidRobot
> >   * branch            main       -> FETCH_HEAD
> > Already up to date.
> > ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git push origin main
> > To github.com:CousinRicky/POV-AndroidRobot.git
> >   ! [rejected]        main -> main (non-fast-forward)
> > error: failed to push some refs to 'github.com:CousinRicky/POV-AndroidRobot.git'
>
> Try just "git pull" and "git push".
> Also what does "git status" have to say?
>
> dik

----------[BEGIN TERMINAL SESSION]----------
ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git pull
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git status
HEAD detached from 638e732
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   README.md

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .gitignore
        README.md~
        androidrobot-36.png
        androidrobot.pre-4.0.css
        androidrobot_head-36.png
        androidrobot_head-norad.jpg
        androidrobot_posed-36.png
        androidrobot_posed-norad.jpg
        droid-comments.txt
        droid.gif
        session.txt

no changes added to commit (use "git add" and/or "git commit -a")
ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> ls -l README.md
-rw-r--r-- 1 ricky users 538 Feb  6 16:32 README.md
-----------[END TERMINAL SESSION]-----------

Since the git pull didn't work, I didn't bother with the push.

I do not understand what's going on with README.md.  I updated this file back in
late October, and this is what I tried to push.  But now, the git status says
that the file's commit somehow became undone, and the datestamp is today!

Weirder still is that the backup file README.md~ still exists; it should have
been deleted a long time ago by my regular cleanups.  It also has today's
datestamp.

It gets weirder.  When I look at README.md in Git-Cola, it shows the version
from before even the backup file!


Post a reply to this message

From: Dick Balaska
Subject: Re: I cannot update my GitHub repo
Date: 16 Feb 2022 15:37:53
Message: <620d60a1$1@news.povray.org>
On 2/15/2022 5:50 PM, Cousin Ricky wrote:
ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git pull
You are not currently on a branch.

ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git status
HEAD detached from 638e732

--
These two are not good.

I have run into this before and honestly what I do, and the easiest way 
out is to git clone a new workspace. Then copy your old/broken files 
(not the .git directory!) over to the new workspace.

dik


Post a reply to this message

From: Dick Balaska
Subject: Re: I cannot update my GitHub repo
Date: 16 Feb 2022 15:41:01
Message: <620d615d$1@news.povray.org>
On 2/16/2022 3:37 PM, Dick Balaska wrote:
> On 2/15/2022 5:50 PM, Cousin Ricky wrote:
> ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git pull
> You are not currently on a branch.
> 
> ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git status
> HEAD detached from 638e732
> 
> -- 
> These two are not good.
> 
> I have run into this before and honestly what I do, and the easiest way 
> out is to git clone a new workspace. Then copy your old/broken files 
> (not the .git directory!) over to the new workspace.

Broken files might be a bad term.  "Changed files that you want to keep 
from the broken workspace".  That's better.

> 
> dik


Post a reply to this message

From: Cousin Ricky
Subject: Re: I cannot update my GitHub repo
Date: 16 Feb 2022 21:24:02
Message: <620db1c2$1@news.povray.org>
On 2022-02-16 16:37 (-4), Dick Balaska wrote:
> On 2/15/2022 5:50 PM, Cousin Ricky wrote:
> ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git pull
> You are not currently on a branch.
> 
> ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git status
> HEAD detached from 638e732
> 
> -- 
> These two are not good.
> 
> I have run into this before and honestly what I do, and the easiest way
> out is to git clone a new workspace. Then copy your old/broken files
> (not the .git directory!) over to the new workspace.

Do you mean clone the GitHub repo?


Post a reply to this message

From: Jim Henderson
Subject: Re: I cannot update my GitHub repo
Date: 17 Feb 2022 10:59:03
Message: <pan$e8446$50072bbb$7ed71ea2$ae813139@nospam.com>
On Wed, 16 Feb 2022 15:37:53 -0500, Dick Balaska wrote:

> On 2/15/2022 5:50 PM, Cousin Ricky wrote:
> ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git pull You
> are not currently on a branch.
> 
> ricky@localhost:~/Documents/POV-Ray/oc_devl/AndroidRobot> git status
> HEAD detached from 638e732
> 
> --
> These two are not good.
> 
> I have run into this before and honestly what I do, and the easiest way
> out is to git clone a new workspace. Then copy your old/broken files
> (not the .git directory!) over to the new workspace.

Yeah, I had an issue similar to this a few days ago, and ended up doing 
the same thing.  Even stashing the changes I had made didn't work, along 
with a hard reset to a known good commit.



-- 
"I learned long ago, never to wrestle with a pig. You get dirty, and 
besides, the pig likes it." - George Bernard Shaw


Post a reply to this message

From: Dick Balaska
Subject: Re: I cannot update my GitHub repo
Date: 17 Feb 2022 13:46:42
Message: <620e9812$1@news.povray.org>
On 2/16/2022 9:24 PM, Cousin Ricky wrote:

> Do you mean clone the GitHub repo?

yes. Something like
git clone https://github.com/CousinRicky/AndroidRobot.git

(making sure that the AndroidRobot subdirectory does not exist from 
where your current directory is.)

I was going to give you the exact line but I couldn't find which 
AndroidRobot was yours among the plethora of search results.


Post a reply to this message

From: Cousin Ricky
Subject: Re: I cannot update my GitHub repo
Date: 17 Feb 2022 18:17:22
Message: <620ed782$1@news.povray.org>
On 2022-02-17 14:46 (-4), Dick Balaska wrote:
> On 2/16/2022 9:24 PM, Cousin Ricky wrote:
> 
>> Do you mean clone the GitHub repo?
> 
> yes. Something like
> git clone https://github.com/CousinRicky/AndroidRobot.git

That worked.  As drastic as that is, at least I have a last resort
fallback when I get stuck.

> I was going to give you the exact line but I couldn't find which
> AndroidRobot was yours among the plethora of search results.

For the record, it's https://github.com/CousinRicky/POV-AndroidRobot

It occurred to me that the reason for the snag /may/ be that I tagged
the repo in GitHub.  I just discovered that tags are not a GitHub
feature, but are part of Git, so tagging it in GitHub probably threw it
out of sync with my local repo.

If that's the case, then I'll need to clone *all* of my repos.  :(


Post a reply to this message

From: Cousin Ricky
Subject: Re: I cannot update my GitHub repo
Date: 17 Feb 2022 21:49:31
Message: <620f093b$1@news.povray.org>
On 2022-02-17 19:17 (-4), Cousin Ricky wrote:
> 
> It occurred to me that the reason for the snag /may/ be that I tagged
> the repo in GitHub.  I just discovered that tags are not a GitHub
> feature, but are part of Git, so tagging it in GitHub probably threw it
> out of sync with my local repo.

No, that wasn't the reason.  My other repos are pushing peacefully.


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.