Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » how do i update my workspace in eclipse after switching branches
how do i update my workspace in eclipse after switching branches [message #1724901] Fri, 26 February 2016 22:08 Go to next message
Dave Banty is currently offline Dave BantyFriend
Messages: 10
Registered: February 2016
Junior Member
Guys,

After I have switched to a new branch in Eclipse, from branch1 to branch2, my ref/head now points to the new branch, but how do i refresh the project in my local repository so i can see the code?

it still shows me the code from branch1, i want to see branch2 code
Re: how do i update my workspace in eclipse after switching branches [message #1724933 is a reply to message #1724901] Sat, 27 February 2016 10:38 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1072
Registered: July 2009
Senior Member
If you check out another branch this should be immediately reflected in the Eclipse workspace.

Note that Eclipse only shows resources located under an Eclipse project.
If there are some additional Eclipse projects in branch2 which are not present in branch1 you
may need to import these new Eclipse projects by selecting the repository in the repositories view
and clicking "Import projects".

If you modified some files and didn't commit these changes (they are decorated with ">")
these modifications will stay when you switch to another branch in order to prevent that you
loose these changes (git command line behaves in the same way).
Re: how do i update my workspace in eclipse after switching branches [message #1724978 is a reply to message #1724933] Sun, 28 February 2016 12:37 Go to previous message
Dave Banty is currently offline Dave BantyFriend
Messages: 10
Registered: February 2016
Junior Member
Yep, got it working, thanks alot Matthias!
Previous Topic:Stash complains of merge conflict - how to resolve this in egit?
Next Topic:Apply stashed changes during interactive rebase
Goto Forum:
  


Current Time: Thu Aug 22 22:32:01 GMT 2019

Powered by FUDForum. Page generated in 0.01493 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top