D
D
DeniSidorenko2020-01-13 09:18:32
git
DeniSidorenko, 2020-01-13 09:18:32

How to connect to the desired github repository?

There is a repository on github, I downloaded the files using the download button instead of clanning. And for this, the files are in no way connected with that repository. How can I make the files on my PC connect to that repository? (The change was made in local files, so cloning one from github is not an option)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DeniSidorenko, 2020-01-13
@DeniSidorenko

git init
git remote add origin url_репозитория
git fetch origin
git reset --mixed origin/master
git add измененные файлы
git commit -m "комментарий к коммиту"
git push -u origin master

R
res2001, 2020-01-13
@res2001

Clone to another directory, copy the changed files there and commit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question