How about if the local-branch exists already and all you want to do is tell git to start tracking the remote-branch from the local-branch without overidding all changes in the local-branch?
Try the following command;
git branch --set-upstream local-branch origin/remote-branch
To update your local set up with all available remote branches for a particular remote repository, try
git remote update
git branch -a
git checkout "branchname"
You can create a new remote branch from a local branch by simply issuing a push to the remote repository and specifying the new branch name like so
git push -u origin "new branch name"
No comments:
Post a Comment