Skip to content
 
 

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

intro-to-git

An introduction to Git, the Version Control Management System

How to use this repo

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.

2. Fork this repository

Click on the Fork button on the top-right of this page. Go through the Forking Guide for more details.

3. Launch Git Bash

You can search for Git Bash in the Start search bar and open it.

Navigate to your Desktop

$ cd Desktop

4. Clone your fork

Make sure you are in ~/Desktop

$ git clone [URL]

You can get the URL from the Clone or download button

5. Navigate to the Git clone

$ cd intro-to-git

6. Create a FizzBuzz program

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

7. Update your remote repo to reflect these changes

You can use the Git cheatsheet for reference

  1. 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
  2. Stage this file

    $ git add FizzBuzz/yourname.c

  3. Commit this file

    $ git commit -m "Add fizzbuzz"

  4. Push this commit

    $ git push

8. Head over to your fork on Github to view the changes!

9. Create a pull request

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!

Further reading

  • 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

About

An introduction to Git, the Version Control Management System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages