Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Adding new files to your github repository

Here is a set of instructions to apply new files to my github repository which is called projectx.

Before you start make sure you don't already have the repository name listed as a directory in the local current directory.

1) copy the remote repository to your local machine
syntax: git clone [uri] # eg.
git clone git@github.com:jrobertson/projectx.git

1.5) cd into the newly created local repository eg.
cd projectx

2) copy the local file to the local repository directory
eg.
cp ../projectx2/feed.rb .

3) add the local files to the local repository
syntax: git add [file] # eg.
git add feed.rb

4) Inform the git system that you have completed the required changes for this session.
git commit -a # add a message associated with this file revision

5) copy the new local repository files back to the remote repository.
git push # updates the changes back to the server

Note: The text with the square-brackets should be replaced with your own values.

Reference: A tour of git: the basics [cworth.org]
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS