Using Egit on svn repo [message #644808] |
Tue, 14 December 2010 05:02  |
Eclipse User |
|
|
|
Hey,
i just started using git and I'm getting along with the command line tool. I want to be able to work out of my ide so i installed EGit.
I have 2 problems, I don't see any way to commit to svn, only my git repo. I looked in the documentation, but did not find anything to do a dcommit.
The 2nd problem is the support for subprojects and the .gitignore file. Every time I do a synchronize inside eclipse, it seems to totally ignore my .gitignore file.
I started out with using .git/info/exclude but then I read that EGit doesn't use that file. My .gitignore file contains this:
target/
.project
.classpath
.settings/
.springBeans
.gitignore/target
I want to define my .git ignore in my parent project and let my subprojects use that. Is that possible?
|
|
|
|
|
|
|
|
|
Re: Using Egit on svn repo [message #753343 is a reply to message #749880] |
Tue, 25 October 2011 16:40   |
Eclipse User |
|
|
|
R Shapiro skrev 2011-10-25 15.49:
> These are nothing very special, just simple external tool launchers that run command-line git. Here's a detailed example
>
> Main section:
>
> Location: ${git_exec}
> Working directory: ${git_work_tree}
> Arguments: svn fetch
>
> I have a whole set of these checked in as part of the repository (see the Shared File option in the Common section). Most are for git svn operations: 'svn fetch' , 'svn
> dcommit', 'svn rebase' etc. Others are for other operations not yet supported by egit, for example 'stash', or for operations that are more efficiently done with
> command-line Git, for example 'log --stat ${git_branch} ^trunk'
>
> The variables git_work_tree and git_branch are part of egit. On the other hand git_exec is my own String Substitution variable whose value is the location of the Git
> executable. I use a String Substitution variable rather than absolute path for the executable so that I can share these launchers with other team members who have Git
> installed in another location. For instance mine is defined as /usr/local/git/bin/git while other team members want C:\something\git
Glad you found them. I added these variables for exactly these kind of things,
although it turns out I use them mostly for accessing a converted objects from
a Clearcase view :(
The full set of variables are:
git_branch
git_dir
git_work_tree
git_repo_relative_path
The last one is the variable that allows me to map to other tools. By default they relate
to the currently selected resource. Optionally you can add an explicit resource name after the
colon: e.g. ${git_dir:MyProject}
Adding git_exec might be an idea, since EGit actually tries to figure out where there is a command
line version. EGit wants to know since there is a system-level gitconfig file, that contains
important settings, especially on Windows. git_prefix might be a more appropriate name, and you'd then
use ${git_prefix}/bin/git for the command line.
-- robin
|
|
|
Re: Using Egit on svn repo [message #753510 is a reply to message #753343] |
Thu, 27 October 2011 10:17  |
Eclipse User |
|
|
|
These variables are very handy. Somewhere I found this documentation, I forget where:
git_branch: Current HEAD in the Git repository that contains the selected or referenced resource.
git_dir: The path to the .git directory for the selected or named resource.
git_repo_relative_path: Path of the selected or named resource relative to the Git repository.
git_work_tree: Work tree root of the Git repository for the selected or referenced resource.
I like that they're based on the selected resource as I often have working directories from more than one repository in a single workspace.
Re: git_prefix, I agree that's better than git_exec, and it would be nice if this were part of egit, particularly if it's already looking for a command-line git on the PATH.
Maybe you can announce here if/when the nightly build of egit includes git_prefix.
|
|
|
Powered by
FUDForum. Page generated in 0.06231 seconds