Hello how about you see a problem with git, it made me revert to a version that I didn't want, so I had to re-edit the whole repository from an even older version Currently the local repository doesn't have any GIT file, how can I add the local folder to a remote repository, without altering anything in the local and rewriting everything in the remote?
EXAMPLE I had repository X running version 56 and wanted to ROLL BACK to version 55 but instead rolled back to version 45 From the repository Download version 55 and delete all files that reference git I mean the ".git" folder. And work on the repository until you achieve the modifications you wanted and would like to place it, I don't know how to add it so that the changes made can be uploaded to the remote repository as revision 57, locally it is not as a repository because the folder is totally deleted. How I should proceed? From already thank you very much
Let 's call
X
the folder that you have locally, the one that has no repository (.git
) and that has things as you want them to be.I would do the following:
Y
Y/.git
to the folderX
git status
in the folderX
to verify that itgit
correctly detects the changes between version 56 (which will be the last available, as it is cloned from the remote), and the current state of the folder.git add
the changes that interest you andgit commit
with the appropriate message. That will create version 57 locally.git push
from the folderX
. That will push that last commit to the remote.