GitHub is an online project hosting service. It offers both paid plans for private repositories, and free accounts for open source projects.
It is the most popular open source code repository. This post provides a simple step by step procedure to configure a free account on GitHub and explains how to upload your projects in to the repository.
1. Create an account at GitHub
Sign up for a free account and verify your email ID.
Here is my GitHub repository : MyProjects
2. Create a repository
A repository is the directory where you keep your projects. See the right corner of your homepage after log in.
Click on the 'Create new repo' icon and a box will appear
Give an appropriate name and description for your repository .
Create it..
Create your directories in an organized manner.
Read this for setting up Git in your system
Uploading Files to the repository
1. First you need to sync your local directory with the Git online directory
Make a directory in your system
mkdir mygitdirectory
cd to mygitdirectory
Now initialise Git by
git init
To sync the online content
git clone https://github.com/yourusername/yourdirectory_path.git
You will see that the entire files inside your local folder.
You can edit the files, add new or delete.
Now you need to commit the changes
Suppose you created a file 'hello' and to upload it to the repository,use the following commands in terminal
git add hello //file is added
git commit -m 'first commit' //commit message
git remote add origin https://github.com/yourusername/MyProject.git
git push origin master //pushing file into GitHub
Congratulations !! You have made your first commit
It is the most popular open source code repository. This post provides a simple step by step procedure to configure a free account on GitHub and explains how to upload your projects in to the repository.
1. Create an account at GitHub
Sign up for a free account and verify your email ID.
Here is my GitHub repository : MyProjects
2. Create a repository
A repository is the directory where you keep your projects. See the right corner of your homepage after log in.
Click on the 'Create new repo' icon and a box will appear
Give an appropriate name and description for your repository .
Create it..
Create your directories in an organized manner.
Read this for setting up Git in your system
Uploading Files to the repository
1. First you need to sync your local directory with the Git online directory
Make a directory in your system
mkdir mygitdirectory
cd to mygitdirectory
Now initialise Git by
git init
To sync the online content
git clone https://github.com/yourusername/yourdirectory_path.git
You will see that the entire files inside your local folder.
You can edit the files, add new or delete.
Now you need to commit the changes
Suppose you created a file 'hello' and to upload it to the repository,use the following commands in terminal
git add hello //file is added
git commit -m 'first commit' //commit message
git remote add origin https://github.com/yourusername/MyProject.git
git push origin master //pushing file into GitHub
Congratulations !! You have made your first commit
No comments:
Post a Comment