Homework on GitHub

17 views
Skip to first unread message

John Trupiano

unread,
Aug 23, 2009, 3:24:36 PM8/23/09
to bmore-...@googlegroups.com
Hey guys,

I've pushed my homework up to GitHub: http://github.com/jtrupiano/stanford_cs193p

Feel free to follow the repo or to check it out if you're having difficulty with any parts of the assignments.  Obviously, you can clone it and open it right up in Xcode / Interface Builder if you like (might be useful for the .nib file since the GitHub diff's will be unlikely to be very helpful).

Ed has also created a GitHub repo for his homework: http://github.com/nerdEd/CS193P

Ed, you had mentioned that you were unsure how to "merge" the first two assignments into a single repository.  These are the steps I took to accomplish it.

Assumption: You have each assignment/project in separate git repositories, each underneath the same parent folder (e.g. stanford).  I'll refer to them as WhatATool and HelloPoly (naturally).

  1. Under the stanford/ directory (and side by side with the other two repos), make a new folder that will serve as the parent, e.g. stanford_cs193p.
  2. $> cd stanford_cs193p && git init
  3. $> git fetch ../WhatATool master:WhatATool
  4. $> git fetch ../HelloPoly master:HelloPoly
  5. $> git merge WhatATool
  6. $> mkdir WhatATool
  7. Now, manually 'git mv' all of your files into the new WhatATool/ directory.
  8. $> git commit -m "Import WhatATool"
  9. $> git merge HelloPoly
  10. $> mkdir HelloPoly
  11. Now, manually 'git mv' all of your files into the new HelloPoly/ directory.
  12. $> git commit -m "Import HelloPoly"
A few notes:
  1. Supposedly there's a quicker way to do this with git-filter-branch, but I failed to understand it well enough or get it to work.  If anyone knows how to do this, please chime in.
  2. You may just want to blow away the existing GitHub repo you have and start fresh.
You can see that I was able to keep my commit histories which was my primary goal: http://github.com/jtrupiano/stanford_cs193p/commits/master

If anyone else wants to share their homework solutions, please respond with a link to your github repo.

-John

Tony Amoyal

unread,
Aug 23, 2009, 4:06:23 PM8/23/09
to bmore-...@googlegroups.com
Thanks, John.

I'll be keeping my homeworks on github as well.


-Tony

John Trupiano

unread,
Aug 23, 2009, 5:19:50 PM8/23/09
to bmore-...@googlegroups.com
Also, as an fyi, I was able to deploy my HelloPoly app onto my iPhone.  If you guys are having any trouble actually getting the apps on your devices, I can try to help you troubleshoot it.  I had to fiddle around for a couple of hours before I was able to get it working.

-John
Reply all
Reply to author
Forward
0 new messages