0

I'm working in a group project. We have have a private git repo on github. I want to clone that repo and name it as 'new repo' in such a way that the new repo can only be accessed or modified by me. Any change on the old repo must not affect my repo. Is this possible?

Keep in mind the old git repo was not created by me, I was invited.

user268396
  • 11,576
  • 2
  • 31
  • 26
many may
  • 13
  • 1
  • RTM: http://git-scm.com – TheGeorgeous Aug 08 '16 at 09:13
  • "I want clone that repo" So why don't you just clone the repo locally? That would do what you are asking for. Or do you want the clone to exist on github, too? That would be a question about github, which is off-topic here. – sleske Aug 08 '16 at 09:16
  • 2
    Possible duplicate of [How do you clone a git repository into a specific folder?](http://stackoverflow.com/questions/651038/how-do-you-clone-a-git-repository-into-a-specific-folder) – Polygnome Aug 08 '16 at 09:35
  • Upvoted to remove the negative vote. It's a pretty clear question, and not at all different from all the other git questions which could easily be answered by RTFineM. The important part is obviously not the "clone" but the "change on the old repo must not affect mine"; the OP obviously does not know (until now!) that there is no "automatic down-push" of changes with git. That does not make the question bad. – AnoE Aug 08 '16 at 10:43

3 Answers3

0
  1. git clone repo.git
  2. git remote remove origin // Because you want to remove it completely.
  3. Create a new repository on Github manually.
  4. git remote add origin git@github.com:user_name/new_repo.git
  5. git push -u origin HEAD
Don Branson
  • 13,631
  • 10
  • 59
  • 101
Shravan40
  • 8,922
  • 6
  • 28
  • 48
0

If you are working on a private repository and you are listed as a collaborator

You can clone the repository like any other repository using

git clone <url>

In order to push my local copy of the above to a remote repository elsewhere

git remote add <remote_name> <url>
git push [-u] <remote_name>
e.doroskevic
  • 2,129
  • 18
  • 25
0

I think you can just fork it and remove other project member. Also can clone it, push to your Github and keep it private

Laily
  • 4,024
  • 1
  • 14
  • 14