I’m no Git

I have tried on a number of occasions to understand the nature of Git and GitHub and I’ve been less than successful.  Yes I’ve created repositories, done the push and pull bit with commit but I never got it.  So I went back to basics I did the course at codeschool.  It was good and I understood it, but I didn’t ‘get it’.  The old cliche a picture says a thousand words was true and with the help of this diagram below a light came on and showed me a way in.

 

GitWorkflow

 

So I did the first part, the basic git work flow

1.Setup the Project Folder

    Command Listing
          pwd
          mkdir projects
          cd projects
          pwd

2.Git Configuration

    Command Listing
          git config –global user.name “Your Name”
          git config –global user.email “mrabe@git.training”
          git config –global –list

3.Copy the Repository (clone)

    Command Listing
          # paste in your GitHub HTTPS clone URL
          git clone https://github.com/alwinsol/github-demo.git ls
          cd github-demo
          ls
          git status

4. The First Commit

    Command Listing
          echo “Test Git Quick Start demo” >> start.txt ls
          cat start.txt
          git status
          git add start.txt
          git status
          git commit -m “Adding start text file” git status

5. Publishing the changes to GitHub (push)

    Command Listing
          git push origin master

These few commands allowed me to ‘get’ Git as I understood what was happening.  I can now say I ain’t afraid of no Git

Leave a Reply

Your email address will not be published. Required fields are marked *