![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Dick Balaska <dic### [at] buckosoft com> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 2/17/2022 9:49 PM, Cousin Ricky wrote:
> 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.
I think it was something like "git checkout <tag>" or "git branch <tag>"
I stuffed up a workspace recently and I can't recall what I did to
trigger it. But once you detach from head, you're screwed.
(Maybe it was "git stash ; git pull ; git stash pop" [ Warning, not
merged ])
It wasn't the repo that you stuffed, it was just that workspace.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Thu, 17 Feb 2022 21:57:05 -0500, Dick Balaska wrote:
> It wasn't the repo that you stuffed, it was just that workspace.
This is a really important point. Even if you push bad changes to the
repo, it's actually pretty hard to "break" the repo beyond repair,
because you can almost always check out a known good commit (the only
time you can't is when you've done something like a hard reset locally
and then pushed IIRC, but even then it may be recoverable).
That's one of the really nice things about using source code management
systems.
--
"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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |