Git add error - error: 'main/' does not have a commit checked out #23461
-
I am trying to push a rails 6 app to heroku. I am following these steps:
when I run command: git add . I get this error: Any suggestions would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 22 replies
-
hi, I’m also new with git and have the same problem, did you solve it? thank you … |
Beta Was this translation helpful? Give feedback.
-
Im having the same exact error. any news of how to fix ? |
Beta Was this translation helpful? Give feedback.
-
There may be directory called Main, If you can find directory called Main , there may be .git folder hidden into it. If there is nothing else in Main directory, you may try deleting it and then re-run commands. Hopefully it should work |
Beta Was this translation helpful? Give feedback.
-
Gracias, me funciono |
Beta Was this translation helpful? Give feedback.
-
Thanks, it worked perfectly. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much! |
Beta Was this translation helpful? Give feedback.
-
Where is that directory? Where do I have to look for? Thanks |
Beta Was this translation helpful? Give feedback.
-
I just started practicing the git, thank you for your help @ApurvP19 |
Beta Was this translation helpful? Give feedback.
-
If someone else is experiencing this issue and can't find a Main folder. |
Beta Was this translation helpful? Give feedback.
-
Hi there, Main is the default branch at GitHub as I noticed. I can change and check it in my Ubuntu as in the attached file. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
can anybody sort me from this |
Beta Was this translation helpful? Give feedback.
-
Im not sure but give it a try
…On Wed, Jan 25, 2023, 8:01 AM Huzaifa Alnaeem ***@***.***> wrote:
Hi will this going to work on linux too??
—
Reply to this email directly, view it on GitHub
<#23461 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A47UDAPZLTTUBMQC76LXPITWUDMUVANCNFSM57PWSFBA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I faced same error, I found there was .git hidden folder inside my folder that was giving me error |
Beta Was this translation helpful? Give feedback.
-
Solution |
Beta Was this translation helpful? Give feedback.
There may be directory called Main, If you can find directory called Main , there may be .git folder hidden into it.
If there is nothing else in Main directory, you may try deleting it and then re-run commands.
Hopefully it should work