-2

i just follow this steps to upload this project to repository in my github

enter image description here

and this problem comes, how i can fix this? enter image description here

Furnox21
  • 1
  • 2
  • 1
    What specifically is the error? – Jerven Clark Dec 29 '21 at 03:23
  • MSI Gaming@MSI MINGW64 ~/Documents/Project/SistemAkademik ((c273eb3...)) $ git commit -m "Add all my files" HEAD detached from 9b3e8f9 Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: sia (modified content, untracked content) no changes added to commit (use "git add" and/or "git commit -a") It's like that – Furnox21 Dec 29 '21 at 03:24
  • 3
    @Furnox21 Welcome to SO! Please avoid posting links to images. Among other concerns (dead links) it excludes those with visual impairments from contributing. – RamblinRose Dec 29 '21 at 03:33
  • 1
    Does this answer your question? [How to switch from detached head to attached head in GIT](https://stackoverflow.com/questions/65583909/how-to-switch-from-detached-head-to-attached-head-in-git) – Joe Dec 29 '21 at 03:36
  • You're using submodules, which is probably how you got this detached-HEAD state. But if you're a beginner in Git, you should *avoid* submodules: don't tackle them until you understand Git fairly well. (They cause even somewhat experienced Git users a lot of pain, hence their nickname of *sob*-modules.) – torek Dec 29 '21 at 03:39

1 Answers1

0

You need to stage your modified files first with commands :

git add <yourfile>

Git itself have stage area which was contains of your file that going to commited to your repo. For better explanation why it need to be staged...

well If you don't want to git adding them one by one xD, you can use

git add -u // will added your modified files to stage 
git add * // which will add all of your files including your new files (literally everything to stage)
git commit -a // will commiting 

A little bonus, Git Cheat Sheet xD Also i have little advie, it was better if you work with your code around with Visual Code... its more simply to commit a changes to your repo in github with feature there.