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.
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.
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
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
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.
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.
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
- GitHub Guides https://guides.github.com/
- GitHub for Windows https://windows.github.com/
- Mastering Markdown https://guides.github.com/features/mastering-markdown/
- Emoji http://www.emoji-cheat-sheet.com/ ๐
- Git Notes https://github.com/tacksoo/bash_basics/blob/master/git.sh
- GitHub Tricks http://solutionoptimist.com/2013/12/28/awesome-github-tricks/
- GitHug: The Git learning game https://github.com/Gazler/githug
- Try Git: https://www.codeschool.com/courses/try-git