Configuring Git to Connect with GitHub

Here we will learn how to configure Git and publish your changes from Git to GitHub.

  1. To learn how to install Git please follow the link below

Installing Git

  1. Once you have installed Git the first step is to open Git Bash and configure your                       user id and user email id. Please make sure to enter the same userid and password                  you have used to create an account in GitHub.

git8

The same way add your email id and the command is as follows

git9

  1. Once you have done that then the next step would be to clone the repository from Github. Here I have created a project call Rolling-Housing Sales-NYC. Click on the project repository and go to clone and copy the link as below

git10

Then type in the following command in unix

git11

Now you see I have the whole project cloned in by local.

git4

  1. Now the third step would be to push your changes from Git to GitHub.

For that I have added a file in Source and now I want this file to be pushed to GitHub for that we have to write the following commands.

  • Here we are adding the object which we need to push

git12

  • Then we check the status. As you can see our file is listed as new file

git13

  • Now we commit the changes

git14

 

  • After we commit the changes we can push the objects to Github. First time users will be asked to enter their user id and password after the below command is executed.

git15

 

 

Now lets check in GitHub if our file has been synced.

git16

 

In this way we can code or make changes in Git and once we want to publish our code we can just sync our changes to Git Hub as above.

 

Cheers!!

Jethin Abraham

2 thoughts on “Configuring Git to Connect with GitHub

  1. I just see the post i am so happy the post of information’s.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be subscribing to your feed and I hope you post again soon.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s