-3

I am trying to "commit" a message using Ubuntu terminal but I get a message of "Untracked files" How can I fix this? enter image description here

I tried changing the working directory to several folders but it didn't work in any of them.

Bubbaloo
  • 17
  • 1
  • 1
  • 7
  • 2
    [Please do not upload images of code/data/errors when asking a question.](//meta.stackoverflow.com/q/285551) – knittl Jan 30 '23 at 21:50
  • 1
    "untracked" means Git does not know about those files. If you want them committed, you need to `add` them first. https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository – knittl Jan 30 '23 at 21:51

2 Answers2

0

@minari got it almost right! just instead of git add * you need git add . which means adding all of the files in the current directory to git. Note that you don't want certain files to be added to git repository like your api kyes and secret stuff, so add those files to .gitignore file. see this and this.

Talkhak1313
  • 301
  • 2
  • 11
-3

You can try type the command git add * in the project folder.

If that doesn't help, before that type git init

enter image description here