| .gitignore | ||
| README.md | ||
| TEACHME.txt | ||
learn-git
This repo is used as an introductory to git commands, for a developer, open-source contributor, or even just to learn the basics
Usage
To be able to learn git, you will have to fork this repository and make it your own. You can click here or press the fork button up there.
Once you've completed this step, you should see this URL below in your browser:
https://github.com/YOUR USER NAME/learn-git/
you can begin this journey with this simple README.md.
Tools
Prerequisites
- Git
- Terminal
If you are not sure if git is installed on your machine, follow the steps below according to your operating sytem type:
Windows
If you are using a Windows operating system, please follow this link.
macOS
If you are using an Apple operating system, please follow this link.
Linux
If you are using Linux based operating system, please follow this link.
Checking
-
For Windows, search
Git Bashon your start menu, and open the terminal. -
For MacOS/Linux, open your terminal
-
Type:
git --versionon your terminal, and it should output the version of your git command without errors.
Learning
Basics
-
First of all, you will need to tell
gitthat who you are, type those command below in your terminal, and replaceYOUR NAME HEREandYOUR EMAIL HERE:git config --global user.name "YOUR NAME HERE"git config --global user.email "YOUR EMAIL HERE"- To check if
gitknows who you are, inspect withgit config --list - You should see your name and email.
- To check if
-
Your second step is to clone your forked (own) version of the repository (see Usage).
git clone https://github.com/YOUR USER NAME HERE/learn-git.git- After the repository has been cloned:
cd learn-git
Guidelines
- Open your favourite editor, and open the folder of this project.
- You will notice a file called TEACHME.txt, it contains a pangram.
- Your tasks is to manipulate the content of this text file to learn git.
Important !!!
- We will use other pangrams found here.
Learning git (part 1) - First commit
Tasks
- Add a pangram to the TEACHME.txt file.
- Save the changes and push it online.
git add TEACHME.txt
git commit -m "Added a new pangram"
git push origin master
Congratulation ! you've completed the first step ! 👍🎉
Additional notes: you can look use
git diffcommand before doing git add to see what have changed.
Additional Notes
TLDR; Git is a command. Github is a website.
The git and website github are not the same. The command git is used to do a versioning system so that you can keep records and tracks of the version of your project codes alongside people you are coding with. On the opposite side, github is a website used to host the project you are working on, and provide you a visual perspective of the management of your project.