Skip to content

This repository purpose is for practicing git.

Notifications You must be signed in to change notification settings

laboratoire-pedagogique/Git-Started

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Git Started

Learn Git with fun

We're gonna learn Git with a simple example so let's git started (haha 😃). What is required for this kata ?

Git installed on your computer/laptop

Linux/Mac

Make sure that git is already installed altough it should be the case. For Debian/Ubuntu distro, you can use this command to install git:

sudo apt install git

Windows

You can download the installer from their website git and just install it.

Let's begin

  1. Create a folder named git-started.
  2. Open Git Bash (Windows) / a terminal (Linux) inside the folder.
  3. We're gonna init a repository locally with this command:
git init 
  1. The default branch is named main or master. We're gonna rename it to dev.
git branch -m dev
  1. Create a file named hello_world.txt with this command:
echo "console.log("Hello World");" > hello_world.txt 

Alternatively you can use your favorite text editor.

  1. Now we're gonna track this file so it can be saved:
git add hello_world.txt
  1. Then we're gonna save the changes we made (creating this file and putting content inside):
git commit -m "chore: display hello world with js" 

Push

  1. Now create a repository named hello-world on Github.

create-repo

Make sure to choose public and nothing else after.

  1. To link the your local repository to your remote repository copy these two links:

link-repo

Make sure to use yours 'cause it is different for users and change the branch to dev

  1. Your local repository is now linked to your repository on Github.

About

This repository purpose is for practicing git.

Resources

Stars

Watchers

Forks