Friday, November 4, 2016

Prevent local branch overwrite - Git pull origin

  1. Reset your local master to match the remote repository's master (WARNING: be sure that you don't have any uncommitted changes you want to keep before issuing the following command):
    git reset --hard origin/master
  2. Fetch all remote branches into your local repository:
    git fetch origin
  3. Create a new local vsup12 branch from the remote vsup12 branch, and switch to this new local branch:
    git checkout -b vsup12 origin/vsup12



Post a Comment


© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me