Hello and welcome to my GitHub tutorial. Today I will teach you how to use GitHub. But first :
1. What is GitHub ?

2. Let's get started.
We will need to register. You can register here .
I will use my account in order to show you how to work with the VCS.
I will use my account in order to show you how to work with the VCS.
We have to create a repository !
How ? You'll see.
First you have to click the create a new repository (a.k.a repo) button on our user page.

After forking we have to clone our repository on our computer . In order to do it you have to type " git clone https://github.com/Username/Repository_name.git"
the repository you have to use "add"(I've already created a ruby file called Hello_world.rb)
First you have to click the create a new repository (a.k.a repo) button on our user page.
After that you have to write the name of the repository , click on the public button to make our repository public and click the green button !
And now we have our first repository !
3. How to install Git on your system
To use GitHub you have to install Git on your computer . I will explain it in few easy steps:
1. Open the terminal
2.Write : sudo apt-get install git-core
3.Write : Y
4.And it's ready for use !

4. Username
We can configure username and with :
git config --global user.name 'Your username here'
5. Fork
When we create a repository we have to fork it using "fork" button.
6. Clone
Now you have your repository on your hard drive.
7. Add and Commit
When you have the repository on your computer you have to put files in it. In order to "add" them tothe repository you have to use "add"(I've already created a ruby file called Hello_world.rb)
After adding the file we have to commit it by using :
8. Push
Now we have the files in our local repository ,but still nobody have access to them. In order to "upload " them we have to use "push" (git push master origin).
9. Pull
What to do if somebody else have pushed something new in the GitHub repository and we don't have it in our local repository? We can update our local clone of the repository by using "Pull" (git pull)
These are the most common commands in git.
Няма коментари:
Публикуване на коментар