Cloning and Creating a Patch
$ git clone git://github.com/git/hello-world.git $ cd hello-world $ (edit files) $ git add (files) $ git commit -m 'Explain what I changed' $ git format-patch origin/master
Creating and Commiting
$ cd (project-directory) $ git init $ (add some files) $ git add . $ git commit -m 'Initial commit'