Git Essentials

Creating a Repository

You can use Git locally on your computer, but it's much more useful to use it with a remote repository (on Github for example). A remote repository is a place where you can store your code and collaborate with others .

You can create a local repository on your computer, and then link it to a remote repository on Github or another service. This allows you to push your code to the remote repository, and pull changes from the remote repository to your local repository.

You can also start by creating a remote repository on Github, and then clone it to your computer. This allows you to pull changes from the remote repository to your local repository, and push your code to the remote repository.

Create a local Repository

Commands used in the video:

$ git init

Staging your files

Commands used in the video:

$ git add FILE_NAME
$ git add .

Commit Files to Local Repository

Commands used in the video:

$ git commit -m "COMMIT_MESSAGE"

Create a Remote Repository and Push to it