Mars Eclipse - branches are the same - eclipse

I downloaded and installed the Mars Eclipse a couple days ago.
When I was working on branches, I've noticed that they are the same...
This is what I'm doing:
I create a new branch "test" and change some files in it. When I switch to branch "master" files are the same like in branch "test".
Does anyone know how to fix it? :)

If you added and committed the changes to your branch, and the files look the same in Eclipse, you just need to refresh your view using F5 or right click on your project and hit 'Refresh'.
If you did not add and commit your changes, then the given behavior is expected.

Related

Recover GIT delete Eclipse

I was trying to add bitbucket to my [existing] project on eclipse so I can commit it and have a GIT to work on, but I screwed up. In my GIT Repository Exploring there were 2 cloned project (the same) so I smartly deleted it to import again. The problem is, in my computer, the local folder with the project got deleted. I need to get my files back (as it was before trying to GIT it). Is there anyway I can do it? I'm desperate, since I've backed up 2 weeks ago and I have modified it a lot !
If Eclipse still has the project you can right click on the project and select Restore from Local History.... Eclipse will show you the files it has saved in its file history cache.

Changing git branch while working with eclipse (what's proper order)?

my problem is that sometimes I change git branch while working live in eclipse. But I do not know what should I do (in what order to to, to don't make mess in both projects).
So my procedure is:
eclipse is open (working on some problems)
git change branch
eclipse > selecting projects and clicking to refresh
work on eclipse, continue job
Is it all right or I should use first Clear&Build and then refresh projects? What do you think, is it important witch order do this while changing branch ? Please help because I am working with friends on big project and I do not want break anything.
If you are working on a particular branch and you want to preserve whatever it is you have been doing, you should add or commit those changes first (git add or git commit) to that branch before changing to a different branch.
If you have the same projects in both branches, then refreshing the projects after changing branch should be fine, but ideally followed up with a clean/build.
If you want to be really safe, you can first close the projects before changing branch, then refresh and re-open them after changing branch.

How can I see where I am comitting to using team > commit on eclipse using svn / subversive

When I right click on a project and select commit it does not show the repository URL of where the commit is going in the commit window, which can be pain for developers. Is there a way to enable this?
Above the project I can see a path along the lines of https://repos.domain.com/repos, Trunk:trunk
Unfortunately this is not always accurate. For example when I am on a branch called MyBranchand select Team > Branch it makes the new branch within the MyBranch branch folder, instead of creating it within the branches folder. I've made this mistake a few times but by my project it will tell me:
https://repos.domain.com/repos, Branch:newBranch
when the path is https://repos.domain.com/repos/project/branches/MyBranch/NewBranch instead of https://repos.domain.com/repos/project/branches/NewBranch
Is there a way to improve on this level of accuracy?
Perhaps, Subclipse would be a better option.
Here's a screen shot of the Subclipse commit window on Eclipse 3.7. The Subversion directory is right at the top of the window.
Looks like Properties > SVN info. I didn't about this and was looking for something within the team menu. I'll leave the question open incase there is a way to view the full repository path next to the project.

Eclipse Egit Not Detecting Changed Files

I have been using Egit and Eclipse together for well over a year. I recently upgraded my computer and had to reinstall everything. Previously whenever I would make a change to a file it would immediately get picked up by Egit and show with the red highlight and star next to the file name in the project explorer.
I have everything back up and running exactly as it was, however whenever I make a change the change is not picked up by Egit. I have to perform a 'git status' in order for the files to show as ready to be staged in the file explorer. Am I doing something wrong to have Egit automatically detect changed files and has anyone else had this problem?
which version of EGit are you using
do you get the egit team menu if you right-click any resource in your git tracked project ?
if not then you need to do "Team > Share > Git", then check "Use or create repository in
parent folder of project". If you are using a very recent nightly build version this
will be checked automatically.
when you modify a file tracked by (e)git a text decorator ">" should
appear in front of the modified file
as soon as you stage the modified file (Team > Add) the decorator should show the star
also the staging view should always show the git status for all modified files
You need to "Add to index" all files again probably
Track Changes Click Team > Add on the project node. (This menu item
may read Add to Index on recent versions of Egit)
(From the EGit docs:)
What I've found is that you need to make sure that your git repositories are showing up in the Eclipse Git Repositories view.
In the repositories view, you click on the [very] little Git icon with a green + (plus) sign to Add and Existing Local Git Repository.
Browse to the directory that already has a .git subdir and click Finish. You should then see you local repo show up in that list.
Then you can right click on the repo while still in the repositories view and add pull down to Import Projects.
"Import existing projects" is selected. Click Next.
Your project should be checked off. Add it to a working set if necessary. Click Next (maybe Finish).
I had a similar issue where all my changes just disappeared. Somehow, Eclipse had unselected my Git repository. Once I selected it again, they all came back.
If you have already added your files to Stage then change the branch it will ask you to commit/stash/reset
I faced the same problem. From your git repository view: Right-click -> Show in git staging
For me I have clicked Team --> Advanced --> No Assume Unchanged, fixed the issue
I faced the same problem using eclipse version 2021.12. Whenever I made changes on file, the eclipse didn't detect it.
I solve it by using Intelij IDE.
i just faced this problem by now, and i resolved by clicking in button Refresh in Git Staging:

Eclipse Subversive plugin: Why can't I create this branch?

I recently switched from Subclipse to Subversive for SVN integration in Eclipse, and I'm having trouble creating a branch of my source code.
I've tried a few different variations of my method, but they all led me to the same roadblock. Basically, here's what I'm trying to do.
Navigator pane
Right-click on project folder (want to branch the whole thing)
Team > Branch
In the Location field, browse to select the /branches folder in my repository
Add the branch name to the path field, i.e. "/testbranch" (not pictured)
The dialog then looks like this, and I can't continue.
http://img820.imageshack.us/img820/1011/branchingfail.png
What am I doing wrong here? Why can't I create this branch? If nothing else, can it at least be confirmed that I'm following the right process, and it's something about my environment or configuration that's stopping the branch from being created?
I found that SVN is very particular with the SVN connectors. If you connected and downloaded SVN code with one connector and then switched to a different connector when you started using Subversive, you'll definitely have problems.
I've had unexplained Subversive problems in the past and they've almost always tracked back to different connector usage. The solution for me was to reset all of my local SVN code. I deleted everything local and rechecked out all of my code. Everything appeared to be fine after that.
I hope this helps.
I don't consider this a proper solution, but it's at least got me working again. Instead of running a branch operation, I created a new folder inside my branches folder, and then copied the contents of the trunk folder into it. I was then able to switch to my new "branch".
Make sure you do not have any uncommited changes, and then do a Team>cleanup. Also make sure you are branching from the trunk and that you do not have any mixed version. For example you can have a folder below the root be from another branch while the rest of the project is from trunk. This will cause the branch creation to fail. When having issues with branches from the navigator, try reverting the project (right click choose team>revert) several times. Then execute the cleanup several times.
Also you may consider creating the branch from the SVN Repositories view. From this view right click on the location you want to branch from (ie truck) and select New>branch from the context menu. One last step is from the navigator view you will need to swtich your project to the newly created brancn: right click on the project root and select Team>switch from the context menu