If you want to start a new git project, first check that the .git folder already exists in the location where you will start your git with the command ls -la
.
If the folder does not exist, just start the project. git init
-
If there is already a git project:
To restart git from scratch, you first need to remove the previous git with the command rm -r .git
.
Then you just create git: git init
.
To add all the files to your stage I advise you to use git add .
instead of git add *
and if you have deleted files that also need to be versioned use the command git add -u
to add all the files deleted to the stage or use git add --all
to add all the (modified, new, deleted) files to the stage.
Then just send it to your repository.