N
N
newaitix2019-05-27 12:24:20
git
newaitix, 2019-05-27 12:24:20

How to connect to a git repository?

There is a repository on gihub.
The local repository (.git folder) has been deleted.
The files that were uploaded to the repository were moved to another folder.
How can I now connect to a remote repository and push updates to the old branch?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
newaitix, 2019-05-27
@newaitix

Created a new repository.

O
O. J, 2019-05-27
@OrlovEvgeny

git init
git add -A
git commit -m "init"
git remote add origin [email protected]:UserName/project.git // заменить на свой
git push -u origin master // master или на нужную ветку

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question