Skip to content
← Back to Community
Following commit, Github shows: "This commit does not belong to any branch on this repository."
Profile icon
ceilingrat

After forking a Github repo and creating a repl from my repo, I made a few changes and attempted to commit my changes back to Github.

The changes were committed, but not belonging to any branch, per Github's message:

This commit does not belong to any branch on this repository.

I made one more attempt with the same outcome.

Now I have two commits, neither belong to a branch.

Has anyone seen this before?

Anyone know why or how this happens?
Or how to resolve it?

Many thanks in advance!

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
DavidLee51
Profile icon
ceilingrat
Comments
hotnewtop
Profile icon
Coder100

So you have been using the UI? The UI is really bad in my opinion, you should have more lower-level access to git.

Hit ctrl+shift+s:

git add . git commit -m "[what you did]" git push -u origin master

You will be prompted to log in along the way, don't worry -- nobody can see it!

Profile icon
HahaYes

@Coder100 yep, the UI still doesn't work. I think it broke... it used to work...

Profile icon
Coder100

did it ever... @HahaYes

Profile icon
ceilingrat

@Coder100 Ha, I expected the UI to work. My bad :P

This is really helpful! Although it didn't work, the CLI is giving me useful errors that I can investigate.

Here's what I got:

Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 14.55 KiB | 0 bytes/s, done. Total 5 (delta 1), reused 0 (delta 0) remote: Resolving deltas: 100% (1/1), completed with 1 local object. remote: error: GH007: Your push would publish a private email address. remote: You can make your email public or disable this protection by visiting: remote: http://github.com/settings/emails To https://github.com/ceilingrat/web-speech-api ! [remote rejected] master -> master (push declined due to email privacy restrictions) error: failed to push some refs to 'https://github.com/ceilingrat/web-speech-api'

I plan to investigate the settings at Github and try again, and I'll report back on the progress.

(I'm taking a lot of notes here in case anyone else has the same trouble.)

Profile icon
Coder100

your push would publish a private email address ok so basically ig you have an email address in there somewhere? @ceilingrat

Profile icon
ceilingrat

@Coder100
There are some settings in Github that help to prevent you from publishing your email address publicly.

Although I tried changing the email that gets transmitted to Github, I had a number of problems:

  1. New email address is only sent from the git CLI. Changes made in the git CLI don't seem to change the email address sent from the version control UI.

  2. Even with a different email, Github was still rejecting my commits until I disabled the setting called Block command line pushes that expose my email.

  3. Although I was able to finally push commits to the master branch again, master is now showing my earliest attempted commit with the email address that I wanted hidden. I don't expect a lot of trouble from having that exposed temporarily, but I want to do some custodial work to scrub that stuff off my Github repos.

Profile icon
Coder100

hmm thats really weird

@ceilingrat

Profile icon
Coder100

make a new bash repl, git clone the repo and then make your changes and push back. Hopefully that will work out better @ceilingrat