Reputation: 47
When one does git switch branch
. Does all the latest changes and files from the remote repository get copied to the local branch? Is it like a replica of remote is created on local and the local and remote both are linked?
Upvotes: 0
Views: 48
Reputation: 17586
No!
As long as you make your commits and branch changes locally, your remote remains unaffected. Only with a git push are your "committed" changes transferred to the remote. Before that, however, you must first perform a git merge in your source branch so that the changes take effect.
Upvotes: 1