When I switch to another branch or tag I can't browse the available options in the repository. Subclipse says
Could not find a repository
svn: No repository found in 'svn://foo.com'
The repository is actually at svn://foo.com/bar. I can fetch the branches if I type in the full address by hand but it'd be nice to be able to choose from all available options. How do I tell Subclipse where the repository root is?
Is bar a top level folder on the filesystem of the server?
If not, check that the server has been started correctly by specifying:
svnserve -d -r /path/to/repository/root
In this example, the full path to your repo would be /path/to/repository/root/bar.
Related
I can't see the GIT commands when using right click on any files in a GIT repository.
I'm using Eclipse-Luna, A fresh install, afeter trying different versions of EGIT.
Thanks,
Elyahu
Some screen shots of the preferences:
I can't see the GIT commands when using right click on any files in a GIT repository.
You must first share that local project in order to make it recognized as a Git repository.
See "How make Eclipse/EGit recognize existing repository information after update?",but don't forget, once shared, to close/reopen your project.
Then Git will be active on said project.
You may classify my question to the layman's level, but I am using Git for the first time (til now I used TortoiseSVN) and I am not sure how I can check out an existing project from a server, so as to have it available on my local machine in a folder. I have installed Git Bash. Should I run it (Gui), select New Archiv and then specify the path of the project in the server? Is there a better Git framework to install, which is appropriate to make the same task more easily?
I would appreciate also some screenshots if needed in the answers.
Update: I have installed also TortoiseGit. I want to create a new clone by a right click in a directory, but the new Clone is not available after the right click. Does it need additional configuration? If no, what should I do from TortoiseGit to checkout an existing project?
I'd usually recommend learning git from command line. But if you are already familiar with TortoiseSVN then TortoiseGIT is a good tool for you.
Also, I think you should learn git very well. I can recommend the book Pro Git.
To "check out" a git repository is called clone in the git world (you will get a whole copy of the server repository). This can be done either from command line or TortoiseGIT.
git bash:
$ cd /path/to/my/projects
$ git clone url-to-server-repo
Update:
Since you get the "normal" TortoiseGit menu (without clone option), it seems you already have a local git repository. You probably created an empty git repository by mistake. Look for a hidden directory .git in the project directory or any parent directory.
right click on the folder (not right click on nothing in the folder, the icon of the folder you want to clone INTO from the parent directory) and select clone from the menu.
FYI:
clone = create a copy of a repository.
checkout = change the current state of an existing repo to a saved state.
so if you have a repo w/ 3 commits (A,B,C) when you clone the repo you will be at the most current state (C). if you want to see the previous state of the repo you would git checkout B. if you want to see the repo's initial state you would git checkout A
hope that helps.
I am very new to GIT and am trying to check out some example projects from the eclipse.org git repositories. I just installed the EGit plugin and have reached a roadblock when trying to enter the correct parameters at the "Import Projects from Git" menu.
The location of the examples I wish to check out are located here.
http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf
However I am unsure how to create the correct URI, Host, and Repository Path from this url.
I would like to be able to explore the different repositories listed on that page (for example the org.eclipse.cdt.examples.dsf folder) and checkout those projects, however I just can't figure out what the correct git url for this would be.
I'm coming from SVN, so I am sure I got some terminology wrong. I have been following this tutorial for using git: http://wiki.eclipse.org/EGit/User_Guide#Cloning_Remote_Repositories
If you click on "Summary" in the page you mention (http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/dsf), you will get a page (http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/) which displays, at the bottom (you need to scroll down), the clone addresses:
Clone
git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
ssh://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
http://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
You can use one of those addresses to clone from Egit: see "Cloning Remote Repositories" from the user manual.
This page contains documentation from the Eclipse project about cloning their git repositories. They show an explicit example for the org.eclipse.cdt.git repository. You can use either this:
git clone git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
Or this:
git clone http://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
I usually use git:// URLs when they're available. They used to be faster, but this may not be true anymore. Either should work just fine.
In general, it looks like repositories are available from git://git.eclipse.org/gitroot/<PROJECT>/<REPO>, where it's up to you to correctly substitute <PROJECT> and <REPO>.
Issue
After importing an Eclipse project from a cloned git repository, I make some changes and commit - and wtf? I get a ".git" folder added to the project, the whole shebang with the heads and refs and worst of all the whole object database gets added to the project, all files/folders having that little question-mark icon signaling that the files have not been added / are not yet tracked by git. This .git folder exists in the actual Working Directory (how does that even make sense?). You can imagine what an annoyance this causes when trying to use the "Synchronize" tool/view (which is supposed to make life easier for committing, you can see all the changes and changed files and diffs).
Question (tl;dr)
How to correctly import an Eclipse project from a cloned git repository? I don't want a .git folder showing up in "Team > Synchronize" when I commit, let the .git folder reside somewhere else outside of my project.
Additional Info
I'm on Windows 7 using Eclipse Indigo and Egit.
I am using Egit to clone a git repo from http://git.apache.org/ (the ofbiz project, to be exact) and in the wizard I choose the option to import an existing project from this newly cloned repo.
Yes I am aware of how little I may expect from Egit. In fact, if there are any alternative ways (external git tool? command line git for windows? other?) to use a git-tracked project in Eclipse which keeps the actual .git stuff out of the project, i'd gladly abandon Egit.
When you clone a git repository, the default behavior is to create a .git folder inside the root of the local clone. You can change the default behavior by setting the GIT_DIR variable:
Git docs says:
"GIT_DIR
If the GIT_DIR environment variable is set then it specifies a path to use instead of the default .git for the base of the repository."
Depending on which terminal you use, you could set it using setenv or export.
For example in a bash terminal:
export GIT_DIR='[path_to_git_directory]'
After setting the variable, you should be able to clone and the .git directory should show up at the specified directory.
I totally agree - I can't imagine it would ever be anyones intent to commit the .git folder!
And git/EGit knows that this is the repository folder of the project, so it should be easy to implement the appropriate exception - so that this folder does not become part of the synchronization.
I know the following does not solve your problem, but in cases where you control the way files are layed out in the repository, you could choose to have the Eclipse project folder not be the root folder of the repository, but rather a sub-folder.
This also allows you to have stuff in the repository that should not show up in Eclipse, or even have multiple Eclipse projects grouped in one repository (if you should wish to do so).
I work under Ubuntu and use Eclipse+Subversive to commit code to my SVN repository.
I accidentally shared a project I don't want to be shared. I disconnected it, but obviously I can still see it (e.g. via websvn interface).
How can I delete this project (folder) from the repository itself?
Use "svn rm URL" command.
See "svn help rm" for details.
You could use the repo-browser of your subversion client (that's what its called in tortoise) to access the subversion structure directly and do your maintenance there.