This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

Introduction to Programming with Ruby

Submitting Exercises

Andy Lindeman's picture
Wed, 2011-04-13 06:11

After setting up git, creating a GitHub account, and forking the coursework repository, you are ready to complete coursework assignments and submit them for review by facilitators and your peers!

After you have completed an exercise, open a command prompt (or Git Bash prompt on Windows) and follow these steps:

  1. Run git status to view files that have changed. Verify that the list of changed files are those you expected.

  2. Run git add [file1] [file2] ... [file] (e.g. in this case, git add ltp/ch01/numbers01.rb) for each file you want to be added in the next revision. Note that you must still run git add for files that already exist in the repository, in addition to completely new files.

    You can rerun git status to verify the files were successfully staged to be committed.

  3. Run git commit -m "Commit message", replacing "Commit message" with a descriptive explanation about the changes you made.

  4. Run git push origin master to push the changes online to GitHub.

  5. Send a message to the email list and ask for review/comments :)

Comments

I'll touch on something Andy

Caley Woods's picture
Caley Woods
Wed, 2011-04-13 23:01

I'll touch on something Andy hasn't just for those who are new to the shell. Shell supports tab completion on filenames. In Andy's example, typing 'git add l' and hitting TAB would complete the full filename of ltp/ch01/numbers01.rb and save you a few seconds :)

Please Note: In my git add example that is the lowercase letter "L"

+1 Thanks Caley!

Andy Lindeman's picture
Andy Lindeman
Thu, 2011-04-14 00:41

+1 Thanks Caley!

Thanks I just tried it! I

Denis Rhoden's picture
Denis Rhoden
Mon, 2011-04-25 23:30

Thanks I just tried it! I literally installed ubuntu 10.10 over the weekend--sharing shell tricks appreciated!

Everything is fine for

Matteo Pompoli's picture
Matteo Pompoli
Tue, 2011-04-26 21:57

Everything is fine for me.
Ubuntu 10.10
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
Aptana Studio, build: 2.0.5.1278522500 with RadRails 2.0.5
git version 1.7.1

Ubuntu 10.10 ruby 1.8.7

Matteo Pompoli's picture
Matteo Pompoli
Fri, 2011-04-29 09:07

Ubuntu 10.10
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
Aptana Studio, build: 2.0.5.1278522500 with RadRails 2.0.5
git version 1.7.1
I'm done with exercises but having trouble with "git push origin master"
Even after changing https to git in .git/config [origin] and re-generating ssh keys I got the following when trying pushing
"Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly"

I will try again tomorrow. Any suggestion in the meantime? Thanks

Ok, i have solved the problem

Matteo Pompoli's picture
Matteo Pompoli
Sun, 2011-05-01 20:15

Ok, i have solved the problem and uploaded exercises. Bye