egit does not show label decorations - eclipse

I am a git beginner.
I have created a git repository with 4 eclipse projects.
A while I was committing and pushing with the git command.
After that, I installed EGit for eclipse. In "Git repository exploring" perspective I added an "existing local repository" and I am able to commit and push changes from this perspective.
The problem is that, in any persective, eclipse does not decorate labels according to Window -> Preferences -> Team -> Git -> Label Decorations. Or more directly said - I cannot see uncommited changes in the project tree.
Any suggestions? Thanks!

OK I just saw the answer here:
Eclipse and EGit
I had to manually add each of the eclipse projects right click -> Team -> Share -> Git -> Finish.
Why do these answers appear when you have just asked? :-)

Related

Remove git repository from Eclipse

I added a git repository to my project and then I hit Team > Disconnect. How do I remove this repository completely? I'm trying to set up a new git repository on my project, but I keep getting an error message.
In Eclipse go to Window > Show View -> Other... Then select Git > Git Repositories. A view with all your Git repositories should now be visible. Right-click on the repository you want to remove and select Delete repository.
Eclipse will now ask for a confirmation and give you the option to remove all repository data.
In Eclipse Neon you can also delete a repository by hand (via the OS). In that case the repository will simply disappear in the Eclipse Git Repositories view. This is not recommended for older Eclipse versions!
If you just want to remove the repository from the Eclipse but not want to delete the data from your computer, follow these steps :
First switch to Git perspective (Window - > Open Perspective -> Other -> Search for Git)
In the Git Repositories section, right click your repository and select Remove Repository from View. This will prompt you to confirm if you want to remove the projects that are imported in Eclipse from this repository. Click Yes and you are done.

How to check out a specific tag with Egit?

Egit is a popular Eclipse plugin that integrates Eclipse with Git/GitHub.
With Git, if I want to work on a specific tag of a project, I clone that project and then run
git checkout tags/<tagName>
However, I don't see how I can do this with Egit. Any ideas?
Right click on the project Team -> Switch To -> Other.... Expand Tags, select desired tag, click Checkout button.

How to change merge mode for eclipse egit merge tool?

We are working with Git and Eclipse. If I'm opening the merge tool to resolve a conflict I get this dialog:
I want to change this afer I marked Don't ask again before. But just cannot find the correct preference page.
Where can I change this after the dialog does not show up anymore?
You can change this in Eclipse Git preferences. Go to Window -> Preferences -> Team -> Git and there is dropdown for Merge Merge tool content.

How do I set up Eclipse/EGit with GitHub?

I've never used Git before and would like to learn.
I have a private repository with GitHub.
I've installed the EGit plugin for Eclipse.
I have a workspace where I do my work, generally: ~/Documents/workspace.
I am able to add my GitHub repository and download it, but in doing so it creates ~/MyRepository.
When I create a project, do I need to point it to ~/MyRepository?
Also, how come when I make an edit and I say push to upstream it says up to date?
Make sure your refs for pushing are correct. This tutorial is pretty great, right from the documentation:
http://wiki.eclipse.org/EGit/User_Guide#GitHub_Tutorial
You can clone directly from GitHub, you choose where you clone that repository. And when you import that repository to Eclipse, you choose what refspec to push into upstream.
Click on the Git Repository workspace view, and make sure your remote refs are valid. Make sure you are pointing to the right local branch and pushing to the correct remote branch.
In Eclipse, go to Help -> Install New Software -> Add -> Name: any name like egit; Location: http://download.eclipse.org/egit/updates -> Okay. Now Search for egit in Work with and select all the check boxes and press Next till finish.
File -> Import -> search Git and select "Projects from Git" -> Clone URI.
In the URI, paste the HTTPS URL of the repository (the one with .git extension). -> Next ->It will show all the branches "Next" -> Local Destination "Next" -> "Import as a general project" -> Next till finish.
You can refer to this Youtube tutorial: https://www.youtube.com/watch?v=ptK9-CNms98
Install Mylyn connector for GitHub from this update site, it provides great integration: you can directly import your repositories using Import > Projects from Git > GitHub. You can set the default repository folder in Preferences > Git.

How to set up Mercurial on Snow Leopard with Eclipse

I'm using Eclipse with C++ plugins on my macbook, trying some practice projects to improve my skills. I'd also like to test out Mercurial and get a taste of DVCS. Unfortunately, Eclipse + Mercurial + OSX seems to be a rare enough combination that there isn't a lot of helpful documentation out there.
What I've done so far:
Installed Mercurial SCM
Installed the HgEclipse plugin
Installed GnuPG
Set path to GnuPG and hg executables in Eclipse preferences > Team > Mercurial
I know I can turn a directory into an hg repository by navigating to that directory in terminal and using
hg init
and then I can add files with
hg add
hg commit
This should give me an hg repo with my files in it. So far, so good...but now I begin to falter.
How do I get HgEclipse pointed to my repo? My synchronize view has a Mercurial option, but when I select it, the Next button is grayed out, and the Finish button doesn't do anything...
Ideally, I would like to set up two local repositories, one personal and one "team" repo, so I can really evaluate Hg as this seems to be the popular configuration. Does HgEclipse only support commits to a single repo, or can it commit to the local repo and push to the "team" repo?
Any other suggestions from DVCS vets on how best to set up my environment?
To point eclipse at your local repo there are two main ways.
File -> Import -> Mercurial -> Clone (Starting a new Project from a repo)
(right click Project) -> Team -> Share Project -> Mercurial
(see How to turn on Mercurial in existing Eclipse project ?)
When you are up and running you can Push/Pull to another repository via the Team push/pull menu item.
(right click Project) -> Team -> Pull ...
(right click Project) -> Team -> Push ...
Ran through the setup steps again, following this excellent guide and everything is now working. I had a little trouble getting my brain around the fact that the eclipse workspace is itself a repository. With that set up, I was able to commit changes and push to another repository very easily.