If you want to start a new git project, first check that the . git folder already exists where you will initialize your git with the command ls -la
.
If there is no folder just start the project. git init
-
If a git project already exists:
To restart a git from scratch, first you need to remove the previous git with the command rm -r .git
.
Done this, then just create git normally: git init
.
To add all files to your Stage I advise using 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 deleted files to Stage or use git add --all
to add all the files (new, new, new, new) to the Stage.
Then just commit and send to your repository.