Starting GIT from Terminal

Asked

Viewed 278 times

3

I’m trying to give git init to the terminal and when I type in this command it accuses that the 'config' and '.git' folder already exists, etc. Also when I try to use git add * it takes time to add the file, now I don’t know if it’s because of git init error or because I’m doing it right on the FTP server.

2 answers

1

When you give a "ls-la", are these files that git accuses there? If so, you can manually remove with a "rm -Rf".

But, what exactly do you want to do? Start a GIT repository? Or just use one that already exists? Maybe Git init isn’t what you want.

1

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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.