I have cloned a repository created by a professor on my virtual machine (I'm running Ubuntu 13.10) and we're supposed to create personal folders. I created mine, but I cannot for the life of me commit and push it to make it show up on GitHub. I swear I have tried every answer on here, and things have improved somewhat. For instance, I originally had a version of Git that was too old and wouldn't permit https. I also created a blank file in my personal directory because I know GitHub doesn't store empty folders.
I originally cloned the repository using:
$ git clone git://github.com/astrofoley/astr596.git
And then used
git config --global user.name "myusername"
and
git config --global user.email "myemail"
I checked with my professor and he made sure I have adequate permissions.
At this point, depending upon which commit and push methods I use (I always try to push to https://github.com/astrofoley/astr596.git), I get several different errors ranging from "nothing added to commit but untracked files present" to simply "403". I have no idea what I am doing wrong, but I suspect it is something related to the fact that the repository belongs to another account. Either way, this is getting incredibly frustrating. Please help!
EDIT: Here's an example of my current problem. I tried adding and committing the file in my directory again using
git add blank.txt
(this step seems to have worked fine) and then
git commit blank.txt
At this point I get the message "On branch master, nothing to commit, working directory clean".
Just to make it comprehensive,
Make a change.
touch somefile.txt
tell git to track this change
git add somefile.txt
commit the change
git commit -m "what you did"
set up your remote.
push
git push <remote> <branch>
Are you added as a collaborator in your professor's repo? If you are working from a linux terminal you must give your professor a id_rsa.pub file to add you as collaborator (since the terminal is not synced with your github account, which actually happens if you use the GUI versions of github for win or mac).
Other option is to fork his repo into your account, clone it from there to your PC and then send "pull request" to the original repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With