Setting Up Git

Setting up your environment to use Node

By Fazeel Ahmed on 2024-09-09

Setting Up Git

Module 0 is about getting started.

First thing is setting up a git project as a good habit. The steps are quite simple.

git init

Assuming you have git installed, it creates a local git project in your current directory.

git add .

This adds all the files in your folder.

git add filename

This adds the specified file to your local project's staging area.

git commit -m "Commit Message"

This insures that you are using and setting up the main branch as the current and main branch. Could rename it to anything but main is standard, as well as master.

git remote add origin <remote repository link>

And then use

git push -u origin main

to link your main branch in the local repo to the main branch in the remote repo.

You would need to set up authentication for your github or gitlab account. That is left up to you to figure out.