Typical Workflow for CSc 103

In what follows, you should find a dense reference for the common tasks you’ll be doing at some point after each class. This assumes you’ve already set everything up.

Get the new stuff

Soon after each lecture, I will post the notes to the csc103-lectures git repository. If you cloned the repository in your home directory, you can get my updates by running:

$ cd ~/csc103-lectures/
$ git pull --no-edit

If you hadn’t committed your changes yet, do so with something like this:

$ git commit -a -m 'saving my work.'

Do some exercises

  1. Go to the desired folder, e.g. via cd ~/csc103-lectures/02/.
  2. Do some work… remember that you can search in vim with the ‘/’ command in normal mode.
  3. Review what you’ve done with git diff, and commit changes.

Efficiency tips

Setting things up

In case you are here for the first time, some set-up instructions:

  1. Be sure you’ve read the git tutorial first.

  2. Now clone the repository for lectures:

     $ git clone https://bitbucket.org/wes_ccny/csc103-lectures.git
  3. There should now be a csc103-lectures folder. Inside, you’ll find other folders, each corresponding to a day of lecture.


Back to the class homepage


  1. Note that all of these keybindings have been lifted from my personal vim configuration and are not standard vim keys. See ~/.vimrc and ~/.vim/after/ftplugin/c.vim for some of these mappings.↩︎

  2. Note: the -A3 says to print the match and the next 3 lines. You can change the 3 to something larger if necessary.↩︎