Going slightly crazy trying to settle a Git Rebase Issue

So, I’m a GitHub beginner and I’ve been trying to use it to incorporate autoupdating functionality into a program I’m prepping to port and run continuously on a Raspberry Pi. However, I made the mistake of using both the Git Panel and GitHub itself to push commits while I update my code and Replit didn’t like that. Here’s what happened:

  1. Tried to Push Changes, but Replit said that I need to pull 2 more commits that I made on GitHub before I continue
  2. Replit blew itself up during the rebase and as put in an “Unsupported State”
  3. Grumbled something about why things couldn’t just be easy and went to the shell to see what’s wrong
  4. Ran git rebase --continue and it returned:
__pycache__/header.cpython-310.pyc: needs merge
You must edit all merge conflicts and then
mark them as resolved using git add
  1. Ran git merge __pycache__/header.cpython-310.pyc and it returned:
error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit
fatal: Exiting because of an unresolved conflict.
  1. Ran git add __pycache__/header.cpython-310.pyc and it politely reminded me that I specifically old it to ignore this file by returning:
The following paths are ignored by one of your .gitignore files:
__pycache__
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
  1. Realizing I didn’t really need a runtime file, I ran git rm __pycache__/header.cpython-310.pyc and got back this because I staged the commit I wanted to push when I did step 1 of this entire process:
error: the following file has changes staged in the index:
    __pycache__/header.cpython-310.pyc
(use --cached to keep the file, or -f to force removal)
  1. Knowing that this file was useless, I successfully continued with the deletion with git rm __pycache__/header.cpython-310.pyc -f
  2. With that done, I ran git rebase --continue to try to continue on with the pull… but of course things aren’t that easy. I got this back:
Committer identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'runner@5993455fd954.(none)')
error: could not commit staged changes.
  1. Thinking that it just wanted the email tied to the GitHib account, I ran git config --global user.email "jediweirdo@gmail.com" then git rebase --continue and got basically the same thing:
Committer identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <jediweirdo@gmail.com>) not allowed
error: could not commit staged changes.
  1. Tried to do the same thing non-globally (got the same error) and then ran git rebase --abort
  2. Went to the gear on the top right corner, copied the email in the authors section, then did steps 1-10 again but using the nopeply email replit was supposedly using. I got this back:
Committer identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <jediweirdo@gmail.com>) not allowed
error: could not commit staged changes.
  1. Yep, the same thing. At this point I was super confused and just exited out and tried to just check its status using git status. Annoyingly, I got this back:
interactive rebase in progress; onto f797ac7
Last command done (1 command done):
   pick 7ea2565 v 1.1 git Creation
No commands remaining.
You are currently rebasing branch 'main' on 'f797ac7'.
  (all conflicts fixed: run "git rebase --continue")

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
    modified:   .replit
    new file:   Attachments/b'3634'/b'3319''s Insructions.pdf
    new file:   Attachments/b'3668'/Fallen Kingdom but Better.mp3
    new file:   Attachments/b'3668'/important picture.jpg
    new file:   Attachments/b'3767'/Presentation 8.key
    modified:   Commands/__pycache__/c_add.cpython-310.pyc
    modified:   Commands/__pycache__/c_basics.cpython-310.pyc
    modified:   Commands/__pycache__/c_print.cpython-310.pyc
    new file:   Commands/c_autoupdater.py
    modified:   Commands/c_basics.py
    modified:   Commands/c_print.py
    modified:   Email Funcs/__pycache__/email_parser.cpython-310.pyc
    modified:   Email Funcs/__pycache__/email_responder.cpython-310.pyc
    modified:   Email Funcs/email_parser.py
    modified:   Email Funcs/email_responder.py
    modified:   Skipped Attachment Log.txt
    modified:   TOTDO.txt
    modified:   Time Keeper.txt
    modified:   header.py
    modified:   main.py
    new file:   startup.py

A Catch-22 presents itself. It says I’m fine to commit, but I literally can’t because apparently I’m not me :confused: . Any ideas on how to proceed? I’m out of google-able ideas at this point, and I’m already fed up with GitHub because their API sucks and doesn’t actually store the information I need to make my autoupdater program to work properly. Thanks for reading all of this!

Sorry to say it was something very simple, but:

It also wanted the user name:

3 Likes

DO NOT PUT .pyc FILES INTO THE REPOSITORY!!! They are binary and are auto genned by python. Use .gitignore to ignore them.

*.pyc

Yeah, I did do that and excluded some of the other autogenerated files + venv, and I think one of the error logs said as much. It’s just that I must have done it in between commits and it caused some kind of conflict. But even then I don’t really know much about git so I’m not even sure if what I said was correct lol. Besides the entirety of pycache and venv, is there anything else I should exclude? For instance, do I still need the replit-exclusive files like the .nix? I think I got the absolute basics, but I don’t know much more than that lol

… god dangit. For some reason, I’m more mad that it worked than anything.

Welp, since you’re here, I might as well ask if it’s possible to get commit messages from the Github API instead of the commit’s summary. I’m pretty sure it’s impossible (along with obtaining the SHA of a GitTag via API calls) , but it’s worth an ask before I nuke my code for the second time due to API limitations

Yeah I completely get that.

That’s… Something I completely have no clue how to answer. Sorry, best I can say is to check git/github’s docs.

1 Like

git log <remote branch>
Use git branch -r to get the remote branches. You may also need git fetch.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.