Refugees Code

Contents

Contents

What is Git?

Read the first block and stop by "What is a repository", we will see that in a while:

https://guides.github.com/introduction/git-handbook/#version-control

Imagine you want to develop a web along with some colleagues.

  • How do you think Git could be of help?
  • What about if you wanted to sell the web to a customer? Do you think Git could help?

Understanding Basic Concepts of Git

In the following video you will see a simple explanation about the basic concepts of git. Git is one of the most used technologies in development, so this will help you a lot! Make sure you bring your questions to class 😉

Think about the web you were building... You are going to work together with a colleague on creating a web: one is going to create the landing page and another one the contact page. Try to imagine how both of you would do to have the same content each one at your laptop.

Create a GitHub account

Follow the steps in the video to create your GitHub account. If you already have one, you can skip this part!

Install and configure Git in your laptop

Install Git:

Open your command line (or terminal) and type the following: apt-get install git

If the installation has been successful, within your terminal type the following command: git. You should see a list of git commands in the output. If you ever find yourself wanting to know what a certain command is, type the following to see a detailed explanation: git help <command>.

Configure Git:

The first thing you should do is to set up your name and email address for your account.

Replace “John Doe” and the email address with your own, of course.

git config --global user.name "John Doe";

git config --global user.email johndoe@example.com

Git basic commands

Below you will find a cheat sheet of the most important commands of git. Some of them might already sound familiar to you from previous videos, and some others might be new.

By now, focus on understanding the first commands until you reach "git diff" (included).

Basic GIT Commands: A Complete Cheat Sheet for Beginners

Here you can see them applied!

Exercises

  1. Hackerschool: Git for Beginners
  2. Github for beginners part 2.
  3. Hello World in Git