Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do clone from an existing clone:

$ git clone git@whatever.com/...

Cloning into example

$ git clone example example-2

This works even if you made uncommitted changes in your first clone. These uncommitted changes aren't copied. You can also check out an origin branch to not work with locally commited changes.

You can use git remote to set the new origin to upstream.

Or, you could use worktrees. That's fine too.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: