Problems committing version on Github

Asked

Viewed 300 times

0

I was doing maintenance on a work application, but at the time a version went up gave the following error:

fatal: Not a git repository (or any of the parent directories): .git

because the directory . git and the gitignore file were not in the project.

What I’d like to know is, how do I upload this version to the existing repository?

1 answer

0


You must have downloaded the files without initializing a local repository. Try, in a different directory, rotate the command:

git clone url_do_repositório_no_github

Then, in this directory, you will have a copy of the repository already pointing to the correct remote address. Copy the files you modified and want to change from the old folder to the folder where you performed the git clone, and for each one of them git add nome_do_arquivo.

Then commit:

git commit

And then try to push by entering your github user and password when requested:

git push

This should generate a commit in the remote repository if your user has contributor privileges.

Browser other questions tagged

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