Tuesday, August 11, 2015

GitHub - HowTo Work With

GithubLogo

It would be easy for us to have program source code stored in centralized version control system in the server. GitHub provide such service free for open source projects. The simple steps herewith will guide you to setup and initialize your very first project into GitHub.

Install Git on Ubuntu

$ sudo apt-get install git

Configuring GitHub

$ git config --global user.name “user_name”
$ git config --global user.email “email_id@domain

image

Create Local Repository

$ git init MyRepo

image

$ cd MyRepo

Create README.md

README.md is initial file you may put on the repo.

$ nano README.md

Adding Repository Files to an Index

For the next, you can populate MyRepo directory with program source codes. copy over all the files into the directory, or create one if you wish to.

$ git add *
$ git commit -m “some_message”

Create Repo on GitHub with Same Name

image

Once the repo is made on the GitHub server, you may then push local content. To connect to GitHub, use following command:

$ git remote add origin https://github.com/yasriady/MyRepo.git

Pushing Files into GitHub

Final step is to push your files into server with following command line:

$ git push origin master

image

Check the result on your GitHub.com



image 
Congratulation,.... you are now on GitHub, Happy Coding....!!

0 comments: