Use github.com to store my repository
Blogs20122012-06-15
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
- login into https://github.com
- Follow the link:
Create a Repositoryto create a empty repository for my new codes.
It is quite easy: just select a reposiotry name, here for example isrepository, thus the acess path ishttps://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.gitRight now, the local Ubuntu and remote https://github.com are sync with my latest codes.
