William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

Use github.com to store my repository

github.com: store my application

Sometimes backup codes between different machines is a little bitter, especially between different OS. github.com is a good place to store resources and sync between different machines and team members. The following lists simple steps to do so.

in https://github.com

  1. login into https://github.com
  2. Follow the link: Create a Repository to create a empty repository for my new codes.
    It is quite easy: just select a reposiotry name, here for example is repository, thus the acess path is https://github.com/myaccount/repository.git.

That’s it. Then locally to create repository and upload to github.

Locally in my Ubuntu

I want to create a dir named repository to hold my codes application; then, push the application into github.com for sharing and backup. The following are the steps:

$ cd repository
$ git init
// first pull from github.com to sync with remote
$ git pull https://github.com/myaccount/repository.git
// add,modify whatever I want.
// edit .gitignore
$ git add .
$ git commit -a -m "whatever"
$ git push https://github.com/myaccount/repository.git

Right now, the local Ubuntu and remote https://github.com are sync with my latest codes.


One response to “Use github.com to store my repository

  1. Pallet 07/03/2012 at 2:43 pm

    Excellent post! We are linking to this great content on our site.
    Keep up the great writing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: