I want to clone my Git repo into NetBeans (which only contains a Unix shell script).
When I'm asked by NetBeans if I would like to create a project for this repo, I only find Java, PHP, Web, C/C++, etc.. projects groups, but I want an bare-bone group, it's just a shell script file, what to do?
I don't want Ant or building anything, I just want to use NetBeans as an editor and commit changes to Git.
Ok, here goes, after cloning the project from GitHub, I was asked by NetBeans if would like to create a project, so I chose yes, then:
1) I chose "Java" under Categories and "Java Free-Form Project" under Projects
2) I created an Ant build file "build.xml" from sample on https://ant.apache.org/manual/using.html
3) After creating the project I moved the "build.xml" to directory "nbproject" and updated "nbproject/project.xml" to point to the new build file destination
4) I updated the "build.xml" tasks to copy source files and license file in case of build and zip the build files in case of distribution
5) Finally I had to add a ".gitignore" fie to the root directory to ignore the "build" and "dist" directories from Git
After this I commited and pushed the whole NB project to GitHub you can find the final files here https://github.com/asaeles/sql_runner
for such simple projects, netbeans would be kind of an overkill, I believe notepad++ and normal git shell would suffice
Related
So, here in the company we work with svn, and our svn server only have the source folder. When I use NetBeans, it's everything ok because I can add source folders in project and will work fine in svn. But on eclipse if i do the checkout from command line and add that folder in my dynamic web project, I can't see the svn history and nothing, svnclipse just does not work on that folder.
Our structure of the projects it's something like this
Workspace
Project folder
Project1
Project configuration files
SourceCode
Packages
Project folder 2
Project2
SourceCode
I already try to make checkout using svnclipse, but he add alot of extra config files, he turns the folder in a project and the source folder is add as a link to another project, in this scenario the svnclipse quick diff does not work properly.
There is a way to use that folder as source and Svnclipse works on that ?
Sorry if my English is not so good
There is no easy way to do what you want. In Eclipse a source control provider can only be connected to the project itself. So options are:
Use another svn client like command line or TortoiseSVN.
Create a small SVN project with the Eclipse project configuration files that also use svn:externals to pull in your source folder from repository.
With option 2, you would checkout this small SVN project from some other repository using Subclipse in Eclipse, could even be a local file:// repository and then the svn:externals property would also cause your source folder to be checked out.
I am using eclipse java as an editor and would like to use the .gitignore to exclude the build folder for the project. This is what I have currently written in my .gitignore. The syntax seems to be right; I used the git documentation but I may have interpreted it wrong.
#ignoring the files within the build folder
/build/
build/**
I'm using a brand new repo so I shouldn't have any problems with already logged files in the repo.
I am trying to get git to ignore the build folder in the project file using a .gitignore. The ignore file didn't work. What could be a solution?
The way the .gitignore is written, this file needs to be in the same subfolder as the build folder, the file being ignored.
when I am trying to share my project with git repository getting exception like this
"Target location for project " " already exists, can not move project"
Writing an answer because I tried many options suggested in many similar questions but none worked. Then I did it manually with following steps that worked, and these steps will work for any Eclipse version:
Goto the Eclipse workspace in the file system and copy the project from there and paste it in some other location in your file system. This will serve as a backup.
Goto your Eclipse and then right click on the project and click delete. You can say delete from the file system because you've already taken a backup in step1.
Goto your Git repo in the file system and paste the project folder at the location you want (may be inside another folder with .project file doesn't matter).
Then come back to your Eclipse and then File->Import -> Import from Git -> Local repo -> Select the Git local repo where you've pasted the project in step 3 and then import it as usual.
As I said earlier, this will work for any Eclipse version.
This situation will happen if you already have a Project of the same name in your local git repository. Sharing a project means steps to commit your project into your local git repository and from there it as ORIGIN will be pushed to Master (Remote). (You are creating again with a new eclipse IDE, or that project was deleted from IDE but committed to local repository in the past).
Solution is simple:
Remove the project from your local git repository.
C:\Users\username\git on windows operating system. (If this not possible then next step)
Rename the project in your IDE (Better recreate a project with same code but with new Project name) that you want to share: repeat the process of sharing on Eclipse IDE.
You may optionally want to recreate after dropping the remote repository(master), if something is already pushed from last push of project, so that everything is clean. You may visit the git repository to confirm it.
In my case this was caused by an extraneous .project and related Eclipse files at the top of the git repository folder. The files were created by Eclipse due to incorrect folder specified on Import of the other projects in the repo.
I use Netbeans (7.3), Mercurial, and BitBucket (BB) for personal version control and backup, and also as a way to switch between my work laptop and home desktop. I'm still learning Mercurial, so I created a C++ test project in Netbeans on my desktop and created the BB repository. On my desktop, I init the Mercurial project, commit, and push to my default BB repo, all using Netbeans's GUI commands (no command line Hg commands). My project consists of main.cpp, Person.h, and Person.cpp, where I do some trivial object creation and "cout" to print some strings (print name of Person, "Dave").
On my laptop, I clone the repo from BB to a local directory and open the project in Netbeans. I get the three files as part of my Netbeans project. Now I create a new object, Computer.h and Computer.cpp, and I commit/push to BB... five .h/.cpp files all total in my Netbeans project now.
Back to the desktop: inside Netbeans, I "Pull from Default" and then "Update". When I do this, I can see (Windows explorer) that the new Computer.h/.cpp files were pulled down into the directory, and my main file now shows the changes using the Computer object (print name of Person, "Dave", and name of Computer, "Hal"). The problem is, even though my main file is up-to-date and my project compiles and behaves like it should with the new code, my Netbeans project tree does not show the new Computer.h/.cpp files. I have to "Add Existing Files..." manually to get the new files into the project tree. It's fine when I only add one or two files at a time, but I have a bigger project with a lot more source files, and I can't keep up with how the project tree changes. How can I get the Netbeans project tree to update and reflect the actual file changes that have taken place (additions and deletions to project)? Thanks in advance!
Ensure that your netbeans is configured to store the project file membership under the source directory for your project, (probably in a nbprojects sub-directory), and add some or all of the files in that to your project, (I would look for the file that lists the project members only).
N.B. you will either have to ensure that netbeans is using relative paths or that you have the same paths on both machines, (preferably the former).
I wish to import an existing CVS managed project into Eclipse. I am currently trying to shift my work on to the Eclipse IDE. Some details about my project and environment below.
I'm working in Linux Ubuntu, the project folder is located on a mounted shared network drive, I have installed the "Eclipse CVS Client" plug-in for my version of Eclipse (Helios).
I've tried many ways for eclipse to use my existing folder as a project and recognize the CVS data in the CVS folders.
I have done the following options:
Created a new project, selected existing source, located my project folder and clicked OK to finish creating. In the end the CVS files weren't automatically read.
Did the same as above and after project creation I wen to the option "project menu->team->share project", it asks me to choose a repository and doesn't automatically find the CVS information in the subfolders.
I have set-up both repositories in my eclipse and can browse the repositories through the CVS browser.
My project directory layout is like this:
+-Project Folder (no CVS folder at this level)
+---Repo A folder
+-----CVS meta-info folder is INSIDE, along with all checked out files from Repo A
+
+---Repo B folder
+-----CVS meta-info folder is INSIDE, along with all checked out files from Repo B
+
+-(couple of random files, not in CVS)
Just right-click on your project and click Team -> Share Project. Eclipse will detect that the folder is already shared and resolve the connection with CVS.
Actually I cannot answer your question (I think it should work as you explaned) but I might have a workaround. Could you remove or rename the existing folder and do a fresh check out from your eclipse/CVS repository exploring view?