Do I lose commit history if I switch to remote branch?

Asked

Viewed 44 times

3

If I change the Git remote I end up losing commit history to the new remote?

1 answer

4


No - when you move a branch up a remote, the entire commit history of that branch goes along.

The only thing is that if you have multiple branches in a remote, you have to climb all the new remote to have an exact replica - but since the vast majority of projects have only one main branch, and sometimes one or two helpers that are really important to the whole history of the project, just climb these.

  • Thanks for the explanation

Browser other questions tagged

You are not signed in. Login or sign up in order to post.