Skip to content

Instantly share code, notes, and snippets.

@tacksoo
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tacksoo/cd5d584dc3178e3ab621 to your computer and use it in GitHub Desktop.
Save tacksoo/cd5d584dc3178e3ab621 to your computer and use it in GitHub Desktop.
WIT Kickoff event: 9/19/2014 Presentation on Git and GitHub

Git is referred to as a distributed version control and source code management (SCM) program. What this means is that it is a fancy way to store and share your programs with other people.

First, let's think what the problems are with regular backups? Suppose we are doing a group project. How would you share code among your teammates? You could email each other the code but it would get tedious very quickly. Also, what happens when you make some changes that turn out to be wrong and you have to go back to a previous working version? These issues can be resolved with a SCM program such as Git. Git is one of the more popular SCM's.

GitHub is a popular website that host projects using Git and it also provides other services such as project management (issues), web hosting, etc.

Okay, so where do we begin? Let's first create an account in GitHub.


Creating an account in GitHub

GitHub is freemium. This means that you only have to pay GitHub if you want to host private projects. 👍 Let's go to GitHub and create an account.

Getting started with Markdown

When you sign up for a GitHub account, you automatically have access to a neat little feature called GitHub Gist. A Gist is a collection of one of more files that can contain instructions and code. I use it quite often when I want to share notes with others. In fact, the very article you are reading right now is a GitHub Gist. What's great about Gists is that you can use a mark up language called Markdown to create rich text documents.

Let's go over some Markdown syntax for the following:

  • Text styling (bold, italic, inline code)
  • Lists (ordered, unordered)
  • Images & Links
  • Headers & Quotes
  • Code
  • Emoji, Tables, Task Lists

Creating a repository in Github

A repository can be created in the GitHub website. A repository holds a project and it contains features such as the wiki for the project, the webpage, issues and etc. We will go over a few concepts and create our own repository.

  • Cloning
  • Commits
  • Logs
  • Reverting
  • Branches
  • Fork/Forking
  • Pull Request

Using the Windows/Mac GitHub client program

In my opinion, Git and GitHub is best used in a command line interface but GitHub's Windows/Mac client program is very nice. Let's install it and try to use it.

Conclusion

Git and GitHub provides a powerful and convenient way to manage your projects. It simplifies collaboration and provides a convenient way to maintain documentation for projects. It is also used to showcase individual projects and seek collaborators.

Exercises

Here are some exercises we will do during the workshop

  • Create a Gist file during Markdown that describes your favorite dish, vacation spot, etc.
  • Create a GitHub repository and create a README.md file for it. Add some files that pertain to the project.
  • Clone the repository on your desktop using Github's client program and create a branch called gh-pages

References

  1. GitHub Guides https://guides.github.com/
  2. GitHub for Windows https://windows.github.com/
  3. Mastering Markdown https://guides.github.com/features/mastering-markdown/
  4. Emoji http://www.emoji-cheat-sheet.com/ 😄
  5. Git Notes https://github.com/tacksoo/bash_basics/blob/master/git.sh
  6. GitHub Tricks http://solutionoptimist.com/2013/12/28/awesome-github-tricks/
  7. GitHug: The Git learning game https://github.com/Gazler/githug
  8. Try Git: https://www.codeschool.com/courses/try-git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment