0

I am taking a software design course, and the prof has decided to host all the lecture materials on Github. I figure I could use GIT locally on my machine to easily get any new lecture materials on my machine. I envisioned being able to clone the prof's Github repo and just git pull in order to sync the remote files with what I have already on my PC. I won't be pushing anything to the remote repo since it's only for storing lecture slides and sample code.

I have cloned the remote repo, but today when trying to git pull I got a message saying everything was up to date, despite there being a new set of lecture slides added to the prof's Github. I ended up having to clone the repo again to get the new files. I would hate to have to do this every time, and I really thought that git pull is for updating and merging changes from a remote repo to a local one.

On the remote Github repo, there is only one branch, Master, to pull from...I don't know if that's helpful. Also, I'm doing all this on Ubuntu.

Can anyone help me figure out either how to temper my expectations about what Git is for, or else tell me how I'm pulling wrong?

EDIT:

I made my own github account, with an empty repo. I added a dummy text file to the github repo, and when I pulled from my PC, I received the text file just fine. I did the exact same thing as I have done for my CS class, so I dunno what gives...

EDIT: As requested, the git version I have is 2.17.1, and the URL of the prof's github page is https://github.com/jin-guo/COMP303_Winter2020.git

P. Gillich
  • 289
  • 1
  • 9
  • No, it doesn't answer the question. I don't understand the fix, or what I'm doing wrong. – P. Gillich Jan 15 '20 at 21:23
  • 1
    Is the branch called `Master` or `master`? (`master` is the default name for the main branch is a new repo.) Also, if it's a public repo, can you include the URL in your question? – Keith Thompson Jan 15 '20 at 21:33
  • I would assume the problem is related to you working on a branch that is not master... or any other branch that is not tracking a branch from your teacher's repo. – eftshift0 Jan 15 '20 at 21:40
  • I ran `git status` and the response was that I was on branch `master` on my PC – P. Gillich Jan 15 '20 at 21:43
  • Again, may we have the URL to this course ? One possibility is that your teacher first pushed some material then rolled back to previous state, which would make it point on the previous commit again. You should try `git remote update` too to get some more content too. Also, if you can't see different branches on your teacher's Github, it's possibly because their tips are referenced by **tags** instead of branches, if they've been considered closed. You should check for tags both on Github's site and in your local repository with `git tag --list` (your entry has been closed too fast IMHO). – Obsidian Jan 15 '20 at 22:21
  • We would enjoy knowning your git's version number as well. – Obsidian Jan 15 '20 at 22:22
  • As requested, the git version I have is 2.17.1, and the URL of the prof's github page is https://github.com/jin-guo/COMP303_Winter2020.git. I ran the tag command suggested by @Obsidian and nothing came up. – P. Gillich Jan 16 '20 at 15:51

0 Answers0