You are on page 1of 20

GitHub Tutorial

By
Eng. Walid Mohamed Ali Mohamed
Information Systems, Faculty Of Computers and
Information
2021
How to create a GitHub Account?
1. Go to https://github.com/ and click Sign Up.

2. Insert your email and press Continue.


3. Create Your Password and press Continue.

4. Enter Your Username and press Continue.


5. Solve the Puzzle Captcha and click Create Account.
6. Check your Email inbox and enter the Code delivered to you.

7. Choose how many members you work with and Student Type.
8. Choose one of the plans.
9. This is Your Dashboard.

Now we want to create a remote repository.


10. Create A Repository.
This is our new Repository
Now we want to make a local repository to be linked with the remote one.

11. Go To https://git-scm.com/ and Download Git for Desktop


and install it with default settings.

12. Go to the folder and Right click and choose Git Bash Here.
13. This will open the Git Command Line.

Type (git version) to check the version of the Git installed on your
machine, and then type (git init) to initiate a local repository of the
project.
Type git status to show modified files in working directory, staged for your next
commit (the red files and folders are not committed to the repo).

To add them to the repo Type (git add <filename>) but to add all
files at one time type (git add .) Now look what happened
Now if we make a little change in any file and save it and try to check
the status again we can see the modified files with red so add them
again by (git add. ).

Now suppose we finished our edits and want to upload the project
to GitHub.
First, you need to authenticate yourself to Git Bash
Type:
git config user.name "Walid Ali"
git config user.email walidmali798@gmail.com
And this is happening once, or you can use access token.
Note :(the username and the email must be the username and the
email that you entered in the remote repository)
After that, we can commit our work like this
git commit –m “first Commit”
Now our project ready to be uploaded to the remote repository
Go to the remote repository and get the link

Now this command links our repository to the remote repo


git remote add origin https://github.com/walid798/AddTwoNumbers.git
Now to push the project to the remote repository.
git push -u origin master
Now Go To the branch the we have created (master) and we can see all
files of our AddTwoNumbers program uploaded successfully.
Now to clone the repo to our local device to work with it this called
clone it.
We can clone it from visual studio.

By Command Line
Open Command Line and type
git clone https://github.com/walid798/AddTwoNumbers.git
Thanks
With My Best Wishes

Eng/Walid Mohamed Ali Mohamed

Information System Department, Faculty of Computers and


Information

You might also like