Changing name of project is not reflected on GitHub - java

I have a java project which I work on using Eclipse ide.
I have renamed my project. This updated my .project file and I pushed it to GitHub.
But GitHub still shows old project name.
Is there any way to change name of project on GitHub?
I am using GitBash on windows to interact with Git

Changing your project name locally does not mean anything to Git or Github, you have to rename your project on Github itself and then update the references to your remote origin at the .git/config file in your local project.

Related

Existing Java Project into Github

I read around to see how to load an existing project into GitHub but I later got really confused. So in the end I did the following:
Created a project which uses the GitHub Repository I have (Library-Tracker) as the location.
Dragged existing Java files into src folder
Committed and pushed
The files showed up on github fine but is this the correct way to load projects onto Github?
Edit: I used eclipse for all of the above
Ye, I think it's fine.
Another one is to create repo using
git init
and then
git remote add origin https://github.com/user/repo.git

Eclipse not recognizing files from SourceTree

My partner made a BitBucket git repository, and uploaded a Java project from Eclipse via SourceTree. I made my own project in Eclipse on my computer, and using SourceTree I pulled all the files from BitBucket. While these files show in Windows Explorer, they don't show in the Eclipse workspace. Is there a way to continue using SourceTree and Eclipse without using EGit, or is there no solution?
Could be because .classpath and .project files are registered in .gitignore so they didn't get checked in to git (that is right as well)
Your eclipse needs to regenerate those file based on your project type

Eclipse Error Logging - Not Showing Because of imported from GIT?

I have just started using the built in GIT functionality of Eclipse and I have everything set up and working, my problem as of now is that I realized my project that I imported from GIT is not reporting errors in my Java like the local copy would. I've tried the following,
Project -> Clean
When I right click on the property files of the folder I can't seem to choose a Java Builder.
It depends on how you import your Java (Git managed) project into the Eclipse workspace.
See "Importing a GitHub project into Eclipse" as an example.
The key is for your Eclipse project to reference the sources in the git repo folder (kept outside the Eclipse workspace folder, in any place you want).

Eclipse setup for git project

There are quite a few questions on this topic, but there are no satisfactory answers unitl now, e.g this.
I'm using Eclipse Kepler (20130529-2219), with ME2 (1.4.0.20130601-0317) and Eclipse Git Team Provider (Java implementation of GIT 3.0.0.201306040240-rc3). So I started with great expectations after reading how great git is.
Firstly, I opened an existing project and removed all the .svn rubbish and commited it to a local git repository. Perfect - now it is time to push the files to a remote repository. After having some problems creating the known_hosts file on Windows the push was successful.
Now the problems started: I wanted to pull changes for the repository, but "... not configured for pull". OK, here it was discussed that this is a common issue, and you have to delete the project and then reimport it from a remote server to allow pulling.
Hence, I set up everything again and pulled the project. Until now I was always told that .project files should not be commit to version control, therefore I didn't include them. The "import -> import from git -> local"-menu does not recognize the files in the repo as a Java project. I can therefore only import the project as a general project or use the project wizzard and set up a new Maven project, which is stupid because all information already exists in the POM.xml. If I do a plain project import, Eclipse does not know that it is a Java or Maven project and throws tonnes of errors.
Question (skip detailed problem): Is there some less awkward way to import a Maven and Java project from a remote git repo when no .project file exists?
Easiest solution: do include the .project (as in this answer) in your git repo.
And do include also the .classpath, since you now can reference relative paths in it, instead of absolute path: see ".classpath and .project - check into version control or not?"
I found an alternative to keep .project file out of Git version control. As you said the pom.xml file should be enough for IDEs to figure out that a maven project it´s in place (and it is).
Let's say you have pushed your project into Git (without .project file) and now you want to import that project into Eclipse.
Make sure you have the Git repo added into Git perspective
Go to J2EE Perspective and double click on an empty space on Navigation View. Import -> Existing Maven Projects
Browse to your Git repo location and voila! Eclipse should catch all pom.xml files and determinate they are independent Maven projects
In my case this worked to pull multiple projects located at one same Git repo, each of them only storing pom.xml file (and no .project at all)

How do you include source file/code when sharing a Project with SVN Eclipse?

I downloaded and installed the latest SVN plugin for Eclipse. I have a Project that I want to Share. I right-clicked on my Project's name, selected Team --> Share Project. This worked like a charm and all my files were checked into the repository. However, I noticed that my Java source code was not included in the repository. In my Eclipse project I have the Java Build Path linked to a separate folder. I like to keep my source code in a separate directory. How do I get SVN to recognize and add this folder to the repository?
Thank you for all your help and advice.
my understanding is, that the folder you would like to add is not a sub-folder of the root folder of your project. In that case, you may find an answer in svn externals:
http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html

Categories