An introduction to Git, the Version Control Management System
1. Make sure you have completed the Hello World Guide.
The Hello World! guide does not require a local Git client. In fact, even making changes to this repo does not require a Git client. However, a local client can be useful, because it allows making changes within the comfort of your IDE.
Click on the Fork button on the top-right of this page. Go through the Forking Guide for more details.
You can search for Git Bash in the Start search bar and open it.
Navigate to your Desktop
$ cd Desktop ⏎
Make sure you are in ~/Desktop
$ git clone [URL] ⏎
You can get the URL from the Clone or download button
$ cd intro-to-git ⏎
According to this problem statement (via HackerRank):
Write a short program that prints each number from 1 to 100 on a new line.
For each multiple of 3, print "Fizz" instead of the number.
For each multiple of 5, print "Buzz" instead of the number.
For numbers which are multiples of both 3 and 5, print "FizzBuzz" instead of the number.
Save the file to the FizzBuzz folder
You can use the Git cheatsheet for reference
-
Check the status of your repo
$
git status⏎If everything is fine, it should show
Untracked files: (use "git add <file>..." to include in what will be committed) FizzBuzz/yourname.c
-
Stage this file
$
git add FizzBuzz/yourname.c⏎ -
Commit this file
$
git commit -m "Add fizzbuzz"⏎ -
Push this commit
$
git push⏎
Follow instructions from the Hello World Guide.
Make sure it is from your head repository: your-username:intro-to-git to base repository: seshaljain:intro-to-git!
You have successfully contributed to a repo on Github!
- Go through the Markdown Guide
Markdown is a simple syntax for writing up documents, like this README - Explore around this repository! Look up Issues, Insights etc