Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+18 votes

I was trying to pull an update from the main repo and even though I saw that the updates had been made on git bash and git hub, I found out that there were no changes made on eclipse. I tried refreshing but that didn't work. I also tried to pull again but git bash gave me a message that everything is up to date.

asked in CSC305 Fall 2022 by (1 point)

2 Answers

+5 votes

I believe we had two different projects uploaded to our repository. My guess it that the project file in eclipse is connected to the older project on GitHub. Even though there were new commits the changes won’t be seen in the older project. There should only be one project file, so I’m working with John to merge the two projects together.

answered by (1 point)
+2

Yeah, that problem occurred on our team project as well but I was referring to the TeamConflictF lab.

+5 votes

Here's one possibility to check:

1) Is the Eclipse project that you have open really the same one that is in the working directory of your git repository? Maybe you cloned the project twice to two different folders on your hard drive, and what you have open in Eclipse is NOT the same project folder as the one that got updated from Eclipse.

To check this, right click on the project within Eclipse, and choose "Properties". Look at the location, which should show you the complete path to the project. Make sure that it matches the folder/directory of your project within the git repository that you pulled from. If not, then you can delete that project, and go to "import existing project" in Eclipse, and browse to the correct location.

2) When you refreshed in Eclipse, did you right click on the whole project folder and choose "refresh", or were you just clicked on a single file?

If these aren't the issues, we'll need to dig deeper to debug this...

3) You said that you could tell that the updates were made on "git bash" and "GitHub". For GitHub, I presume you browsed the code up on the website and could see that something had changed. How can you tell that the updates were made in "git bash"? I'm curious - what commands did you run to verify that the changes had indeed been pulled?

4) What if you just browse to find the files in a folder view on your computer (not using Eclipse), and then open them up using any text editor (like Notepad or Notepad++ on Windows, or Textedit on a Mac)? Are the changes there?

In short, we need to figure out for certain whether this is a problem with Eclipse not seeing the updated files, or whether this is a git issue of the updates not reaching your computer for some reason, even though you apparently successfully pulled.

answered by (5.7k points)
+3

1) I went ahead and took a look at the directory of my local repo and it shows that eclipse is linked with the correct one. And I'm certain I pulled towards the correct directory from git bash.

2) I refreshed the whole Eclipse software.

3) I saw that the changes were made from the message I got from git bash right after I did the git pull command. The initial pull came with a message, but the attempts I made afterward all had the same message, that I was already up to date. I didn't run any extra commands.

4) I have not been able to find the changes in my local hard drive anywhere yet.

+3

Can you swing by my office hours (1:30 - 3:30) today, and I can have a look?

...