GitHub: How to clone GitHub repo ? How to push to Github? How to get files from GitHub ? (Ubuntu)

GitHub is an online repository. Many people find it very confusing to use GitHub, so I’ve decided to share my experience of using it on Linux Ubuntu.

So in this post we will discuss:

1. How to set up and clone repo to your local machine avoiding message: Permission denied (publickey).
2. How to  transfer all changes you are making INTO Github
3. How to get those changes FROM GitHub

My way could not be the most efficient one, but it works for me. 🙂

How to setup up GitHub to your local machine ?

So for the first part, you need to download Git and set your SSH key. Thanks to the GitHub documentation,  step by step guide is here:

How to clone your repo to your local machine ?

(in git terminology it’s called “checkout“)

First you need to find your repo address. It can be find  on your GitHub repo page:

Copy the address in the box (……/….git)

Open the terminal and go to the folder where you want to have your git to be located.

  Type command:


Here is my output:

How to  transfer all changes you are making INTO Github ?

(in GitHub it is called Push)

There are 3 steps to transfer your changes to GitHub:

a. You need to add files  —> git add .

(“.” means all the files, no worries, it will add everything that was changed.)

b. You need to Commit you changes –> git commit  -m “Message you want to see near your commit”

c. Push your changes to the server –> git push

My output:

On the repo I now see that README file has my commit message (I changed only README.txt):

 How to get those changes FROM GitHub ?

git checkout

git pull

These commands will bring all the  new stuff from GitHub to your machine.

Good Luck,


About Anatoly Spektor

My name is Anatoly Spektor (originally Anatolijs Spektors) I am Software and Web Developer. I have worked in Seneca Center for Development of Open Technology on Big Blue Button Add-on - Polling Module, Red Hat and some other places :) I am an author of the book 'Eclipse Debugging How To', Muay Thai fighter and amateur photographer ;)
This entry was posted in GitHub, open-source, Programming Languages, Project BBB, Tutorials, Ubuntu and tagged , , , , , , , , . Bookmark the permalink.

34 Responses to GitHub: How to clone GitHub repo ? How to push to Github? How to get files from GitHub ? (Ubuntu)

  1. Ian says:

    “How to clone your repo to your local machine ?

    (in git terminology it’s called “checkout“)”

    No, in git terminology it’s called “clone”.

  2. Pingback: Note to Self » Blog Archive » Git

  3. Thanks for your entire work on this web page. My mom delights in going through investigation and it’s really simple to grasp why. Almost all hear all about the dynamic medium you produce invaluable strategies on the blog and even welcome participation from other ones on the concept while our girl is undoubtedly learning a lot of things. Have fun with the remaining portion of the new year. You’re the one conducting a tremendous job.

  4. Dejourne says:

    Very helpful information, i actually learn something for programing

  5. Rafael says:

    It’s in fact very complex in this full of activity life to listen news on TV, thus I simply use web for that purpose, and take the hottest news.

  6. Sweet blog! I found it while searching on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there! Thanks

  7. taxi in bath says:

    Magnificent goods from you, man. I’ve understand your stuff previous to and you are just extremely great.
    I actually like what you have acquired here, certainly like what you are stating and the way
    in which you say it. You make it entertaining and you still take care of to keep it wise.
    I can’t wait to read far more from you. This is really a wonderful website.

  8. Woah! I’m really loving the template/theme of this site.
    It’s simple, yet effective. A lot of times it’s hard to get that “perfect balance” between superb usability and
    appearance. I must say you’ve done a fantastic job with this.
    Also, the blog loads extremely fast for me on Opera.
    Outstanding Blog!

  9. Eugenia says:

    Hi there, I would like to subscribe forг this website to take hottest updates,
    thus where can i do it please help out.

  10. Herbert says:

    I am actually happy to glance at this webpage posts which includes lots of valuable information, thanks
    for providing these information.

  11. I have been exploring for a little bit for any high-quality articles or
    weblog posts in this kind of house . Exploring in Yahoo
    I finally stumbled upon this web site. Studying this info So i am happy to show that I’ve a very
    just right uncanny feeling I discovered just what I needed.
    I so much unquestionably will make certain to do not omit this site and give it
    a look regularly.

  12. hello there and thank you for your information – I
    have certainly picked up something new from right here. I did
    however expertise several technical issues using this website,
    since I experienced to reload the site a lot of times previous to
    I could get it to load correctly. I had been wondering if your web host is OK?
    Not that I am complaining, but sluggish loading instances times will sometimes affect your placement in
    google and could damage your quality score if advertising and marketing with Adwords.
    Well I’m adding this RSS to my email and could
    look out for a lot more of your respective exciting content.
    Make sure you update this again soon.

  13. Kris says:

    Heya i’m for the first time here. I came across this board
    and I find It truly useful & it helped me out a lot.
    I hope to give something back and aid others like you helped me.

  14. Janette says:

    WOW just what I was looking for. Came here by searching for accretive health

  15. After checking out a few of the blog articles on your site, I seriously appreciate your
    way of writing a blog. I added it to my bookmark site list and will be checking back soon.
    Take a look at my website too and let me know your

  16. Chandra says:

    My programmer is trying to convince me to move to .net
    from PHP. I have always disliked the idea because
    of the expenses. But he’s tryiong none the less.

    I’ve been using WordPress on a variety of websites for about a year and
    am concerned about switching to another platform. I have heard fantastic things
    about Is there a way I can import all my wordpress posts into it?
    Any help would be greatly appreciated!

  17. seo company says:

    I love what you guys are usually up too. Such clever work and reporting!
    Keep up the superb works guys I’ve incorporated you guys to my personal blogroll.

  18. wonderful points altogether, you just received a emblem new reader.

    What could you recommend in regrds to your put up that you made
    a ffew days in the past? Any certain?

  19. Christel says:

    If some one wants expert view concerning running a blog afterward
    i suggest him/her to go to see this weblog, Keep up the pleasant job.

  20. Today, I went to the beach front with my kids.
    I found a sea shell and gave it to my 4 year old
    daughter and said “You can hear the ocean if you put this to your ear.” She placed the
    shell to her ear and screamed. There was a hermit crab inside and it pinched
    her ear. She never wants to go back! LoL I know this is entirely off topic
    but I had to tell someone!

  21. Josette says:

    I take pleasure in, result in I diiscovered just what I used to be having a look for.
    You’ve ended my 4 day long hunt! God Bless youu man. Have a
    great day. Bye

  22. sbobet link says:

    Thanks for some other excellent post. Where else may just anyone get that type of info in such a perfect means of writing?
    I’ve a presentation subsequent week, and I am on the look for such info.

  23. Hey there! This is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche.
    Your blog provided us useful information to work on. You have done a extraordinary job!

  24. vin says:

    thank man it works!!!

  25. Joni says:

    I was recommended this website by my cousin.
    I’m not sure whether this post is written by him as nobody else know such detailed about my problem.
    You are incredible! Thanks!

  26. sbobet says:

    Hello! Do you know if they make any plugins to protect against hackers?
    I’m kinda paranoid about losing everything I’ve worked hard on. Any tips?

  27. Yesterday, while I was at work, my cousin stole my apple ipad and tested
    to see if it can survive a forty foot drop, just
    so she can be a youtube sensation. My apple ipad is now destroyed and she has 83 views.
    I know this is entirely off topic but I had to share it with

  28. Asking questions are truly fastidious thing if you are not understanding something fully, however this piece of writing provides good understanding yet.

  29. electricians says:

    This type of training that you get is one hundred percent genuine.
    Getting insight into their experience as far as what type of jobs they
    have done, who their other clients are etc. Previous experience as a foreman isn’t required but does help.

  30. Wendy says:

    Thank you!! This was the only set of directions that has made any sense to me concerning GitHub!

  31. This is not working …. git push tells me there is no git directory.

  32. Yo says:

    Excellent !! Thank you !!

Leave a Reply

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

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s