Reputation: 5667
My friend has created a new branch. Let's call it "branch2". I'm currently on master. I typed git checkout branch2
in Bash. I then type git pull
.
I get the following message:
Unpacking objects: 100% (28/28), done.
From https://bitbucket.org/***/***
* [new branch] Parse_T1 -> origin/Parse_T1
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> Parse_T1
I don't want to ruin anything or merge anything. I just want to switch to that branch and see the updated files in IntelliJ. What should I do? Ugh, CLIs... This is why I love Mercurial.
Upvotes: 1
Views: 4626
Reputation: 12948
First of all get rid of any un-committed changes in the current branch. Then do the followings.
git fetch
'. Now only your local repository knows about any new branches pushed into origin. git checkout branch2
' . It will make a local branch called 'branch2' which contains latest changes in origin/branch2. And you will be switched into local/branch2 automatically. :))Upvotes: 2