Skip to content

Instantly share code, notes, and snippets.

@nizaroni
Created February 20, 2015 15:14
Show Gist options
  • Save nizaroni/852a9bb26721facec912 to your computer and use it in GitHub Desktop.
Save nizaroni/852a9bb26721facec912 to your computer and use it in GitHub Desktop.
How to clone someone else's repository and still get GitHub credit for your changes.
# Clone the other person's repo.
# MAKES A NEW FOLDER! CAUTION!
$ git clone https://github.com/khalifenizar/bbq
# Rename that person's remote GitHub repo.
$ git remote rename origin khalifenizar
# Add your remote GitHub repo
$ git remote add origin https://github.com/yourusername/bbq
# Push to your remote GitHub repo
$ git push origin master --set-upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment