Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot see pushed commits on github

Tags:

git

github

I'm working on an assignment on Coursera where we have to fork a repo, clone a local version, make changes and commit then push them.

And I did all of that. But when I check on my repo URL I am unable to see the pushed commit I just made? https://github.com/gcameron89777/ProgrammingAssignment2

I used git config to set my global values for username and email. I went into the actual files of the hidden .git folder in the directory in question and looked at the config file:

url = https://github.com/gcameron89777/ProgrammingAssignment2.git

Now when I visit the URL, I do not see any of my commits. Shouldn't I?

  1. I edited the .R file in question and saved it.
  2. I then used commit like so: git commit -m "added functions makeCacheMatrix and cacheMatrix"
  3. I then pushed using git push

All the while my current directory is the directory in question.

Should I not see the recent commits I just made?

EDIT: Here is the output of git status and git log:

RMIOMP1310:ProgrammingAssignment2 gavin.cameron$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   cachematrix.R

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    .DS_Store

no changes added to commit (use "git add" and/or "git commit -a")
MRMIOMP1310:ProgrammingAssignment2 gavin.cameron$ git log
commit 7f657dd22ac20d22698c53b23f0057e1a12c09b7
Author: Roger D. Peng [amelia] <[email protected]>
Date:   Tue Apr 22 10:09:22 2014 -0400

    More typos

commit 873d883cbbc6de667b66349c96148203cdbbb8b1
Merge: 9b22d21 4f84c6f
Author: Roger D. Peng <[email protected]>
Date:   Tue Apr 22 10:06:30 2014 -0400

    Merge pull request #1 from gustavdelius/master

    Fixed some minor typos.

commit 9b22d21e3671f46bf535624bbb769786840d05ba
Author: Roger D. Peng [amelia] <[email protected]>
Date:   Mon Apr 21 12:35:04 2014 -0400

    Clarify instructions about forking/cloning

commit 4f84c6fc9c58cfcfeb788e74fbde63549ff20100
Author: Gustav Delius <[email protected]>
Date:   Tue Apr 8 22:11:14 2014 +0100

    Fixed some minor typos.

commit e4eed4153bd237a2dd4532fc3f40ce0e22fd0cb7
Author: Roger D. Peng [amelia] <[email protected]>
Date:   Tue Jan 14 17:16:07 2014 -0500

    A few more comments on what to do

commit 05bf4b3c78e2c1d679f0c94ae0431a281a9a137d
Author: Roger D. Peng [amelia] <[email protected]>
Date:   Tue Jan 14 17:10:40 2014 -0500
:
like image 462
Doug Fir Avatar asked Mar 07 '26 03:03

Doug Fir


1 Answers

as it comes from git status:

Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified:   cachematrix.R

you didn't add your files to the commit - so you basically did commit nothing.

do following:

git add -A
git commit -m "<commit message>"
git push

if you want to have a better understanding how git works, please read this: http://git-scm.com/docs/gittutorial

like image 50
roman-roman Avatar answered Mar 09 '26 17:03

roman-roman