you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 2 years ago (3 children)

If your remote is completely empty and has no commits, you can just push normally. If it has an auto-generated "initial commit" (pretty sure Github does something like that), you could force push, or merge your local branch into the remote branch and push normally. I think cloning the repo and copying the contents of your local repo into it is the worst option: you'll lose all local commits.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 2 years ago

    If it's a single, generated, "initial" commit that I actually want to keep (say, for ex I used the forge to generate a license file) then I would often rebase on top of it. Quick and doesn't get rid of anything.

  • source
  • parent