For context, my git use has posed zero problems until I got my new macbook pro and the configuration/settings I've always used were erased. When I tried to set it up for my new computer, it kind of got seriously messed up. I've done some tinkering and the problem is basically that when I add code and try to commit it, it says that nothing has been added. I discovered it's because my "branch" or whatever (I'm not too sure of terminology) is pointing to the directory in github, which obviously didn't change when I added a file to my local directory.
How do I resolve?
FWIW, when I try to commit, I get
On branch main
Your branch is up to date with 'origin/main'.
Also, I have my own GitHub account, but I think my computer created its own Github account for me or something? Let's say my name is Joe Smith. If I look at my commit history, it says "Joe Smith authored and Joe Smith committed 1 hour ago." I think one of them is my actual Github, and the other was created by my computer accidentally. This belief is reinforced by the fact that Github says:
If this commit is yours, make sure [email protected] is associated with your account.
CodePudding user response:
do remove one branch. and then try it.
CodePudding user response:
I would try and
- make sure my
git config --global user.name
andgit config --global user.email
ar eproperly set (GitHub user account name and email) - clone the repository again in a new local folder, try and make a local modification, add, commit and push.
See then if you do see your new commit.