Starting GIT by Terminal

3

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

    
asked by anonymous 25.06.2014 / 00:21

2 answers

1

When you give an "ls" it, do these files that git accuse are there? If so, you can manually remove it with an "rm -rf".

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

    
25.06.2014 / 01:52
1

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.

    
27.06.2014 / 15:40