Skip to content

Instantly share code, notes, and snippets.

@nkhil
Created November 25, 2018 00:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nkhil/4f6cf13847d2af277d39e328ef8175d5 to your computer and use it in GitHub Desktop.
Save nkhil/4f6cf13847d2af277d39e328ef8175d5 to your computer and use it in GitHub Desktop.
How to close a repo, work on it and upload it to Github as a different repo
// GitHub: git clone someone else's repository & git push to your own repository
// Create a new repository at github.com. (this is your repository)
// Give it the same name as the other repository.
// Don't initialize it with a README, .gitignore, or license.
// Clone the other repository to your local machine. (if you haven't done so already)
// git clone https://github.com/other-account/other-repository.git
// Rename the local repository's current 'origin' to 'upstream'.
// git remote rename origin upstream
// Give the local repository an 'origin' that points to your repository.
// git remote add origin https://github.com/your-account/your-repository.git
// Push the local repository to your repository on github.
// git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment