I entered a new project and I cloned the repository locally. Now I see what is in the master branch on that repository. So, I did
git checkout -b new_branch
Now I am in the new_branch. Everything is great, but I want to pull something from other branch, so I do
git pull origin other_branch
The thing is that "other_branch" doesn't have a folder which "master" branch has, but locally I didn't loose it by pulling. I don't want that folder locally because I only want communication with "other_branch", and not "master". How to solve that issue?
CodePudding user response:
What does git status
say about the additional folder?
EDIT 1
Since I do not know more about your situation. You could try to remove the whole repo first (I know not the git way , but without a proper git status output I am unable to resolve all the posibilites in my head) and then directly clone the repo with the proper branch git clone -b other_branch <url>
see git help for more info