Lesson 7: Git Error - 'main/' does not have a comit checked out #1102
-
Hello! I have been trying to follow the course for uploading my code to github, but when trying to stage and commit files with
Also, in the status, all the files that should be in untracked does not show up there:
I thing that may be by the fatal error of the fail in adding files. I had not used git before, so I would really aprecciate some help here, it is really confising at the beggining. I think it is important to tell that copied all the code from the repo, and ever since everytime I made a change I got the M of modified aside the code name, I do not now if that is related to that... Also, in the Source Control i have 20 pending changes... Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
Check this: (same issue's solution) |
Beta Was this translation helpful? Give feedback.
-
@SebasAran16 Follow these commands and where you face an issue, paste the error codes here. I will check that. You should be at the root level of the project folder.
|
Beta Was this translation helpful? Give feedback.
-
@ali-thegilfoyle Omg really, thank you a lot! The other message was pre-trying to do the steps you told me. I think I was getting an error because of my git was already initialized and I just kept initializing it again and again after errasing ./main just because it is the way is done in the course. The weird thing for my is why Anyways, it was yesterday so stressful for me and today you really helped me man! Thats my repo, the commit message express what this was for me haha. |
Beta Was this translation helpful? Give feedback.
-
Oh that is the -b for, |
Beta Was this translation helpful? Give feedback.
@SebasAran16 Follow these commands and where you face an issue, paste the error codes here. I will check that.
You should be at the root level of the project folder.
git init
git add .
git commit -m "initial commit"
git remote add origin url-of-your-github-repo-here
git branch -M main
git push -u origin main