swsnu / swppfall2017

22 stars 17 forks source link

Clone your team project's repository #100

Open dj-shin opened 6 years ago

dj-shin commented 6 years ago

We need to remove repositories of your team projects (https://github.com/swsnu/swpp17-teamX) We will remove them at 2/27(Tue) 23:59, so please clone or transfer them into your personal account if you need to keep your project.

NOTE: Simply forking the repository will not preserve it since they are private repositories (https://help.github.com/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility/)

tirr-c commented 6 years ago

How can I transfer my repository? I don't see any "Transfer" button!

EDIT: As @yuyupopo wrote below, you can transfer your repo with "Import repository," only when you're not using 2FA. Put your original repository's clone URL, name your new repository, and click "Begin import." You will be asked your username and password. Once it is done, you'll have an exact copy of your original repository, on your hand. :smile:

Again, note that you can't use this method if you've enabled two-factor authentication.


Transferring cannot be done automatically because you're not a repository owner. Instead, you should manually do this.

  1. Clone your original repository with git clone. Of course, you don't need this step if you already have a local copy of the repo.
  2. Create new repository on GitHub. Click the plus button on the top-right corner, and click "New repository." image
  3. You can name the repo as you like, but don't initialize your repo with a README.
  4. Now the repository is created. Copy, or remember the clone URL. It is used later.
  5. cd into the repo directory.
    cd swpp17-teamX
  6. Change the remote URL with the clone URL at step 4, using git remote.
    # replace the URL with yours
    git remote set-url origin https://github.com/tirr-c/new-repository.git
  7. Push your master branch into the new repo.
    git push origin master
  8. Check your repository on GitHub. You're done!
dj-shin commented 6 years ago

@tirr-c Thank you for detailed instruction :smiley:

ahnjaeshin commented 6 years ago

I just clicked the Import Repository Button and imported my team's repository to my own private repo. Will it be fine?

tirr-c commented 6 years ago

@yuyupopo If the commit history looks same, it would be fine.

ahnjaeshin commented 6 years ago

@tirr-c Thank you!