G
G
godsplane2022-03-25 12:52:58
git
godsplane, 2022-03-25 12:52:58

How to properly clone a repository?

I have gea experience at the clone/push/pull level.
I don’t understand one thing: I have my repository, let’s say the template of my project, I clone it and make a website from scratch on it, but it constantly highlights that there are active changes and an icon on the gatihub that I’m inside this project and it’s not allowed now edit.
I just clone the project via https git clone
Maybe I'm doing it somehow wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FanatPHP, 2022-03-25
@godsplane

If I understand correctly, this requires not a clone, but a fork .
That is, you need to
1. Clone
2. Create a new repository in the git
3. Make it upstream to the current code

git clone https://github.com/userName/Repo New_Repo
cd New_Repo
git remote set-url origin https://github.com/userName/New_Repo
git remote add upstream https://github.com/userName/Repo
git push origin master
git push --all

In general , everything is as written here

V
Vladimir Korotenko, 2022-03-25
@firedragon

clone git clone https://github.com/vkorotenko/test1
rename the folder to test2
go to it delete the .git folder
create an empty repository on the github website
do git init
then git remote add your settings
and that's it

P
Pavel Shinyaev, 2022-03-31
@Shpawel

If you use this repository as a template, then you can make it according to the templates that cookiecutter can work with and then initialize new projects with the command:
cookiecutter <путь до репозитория-шаблона>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question