Getting started with your first repository!
Navigate to your directory eg. => cd desktop
Start a new project by making a local repo => mkdir first_repository
Boot up/ initialise your new git repository for your project on your local machine => git init (this command makes whatever folder you are inside of your new git repository and version control starts, meaning you can use all the git commands within this folder)
Nb// any other folder that is not initialised will prompt .git fatal
Make changes or updates to your project eg. create new files. In my case I’ve added and edited a readme.md file.
Before committing we have git staging area — A place where we temporarily add or remove files that we want to be in our next commit.=> git add filename if you have new files. In our case => git add readme.md
=>git status if we want to check what we did, By default we are on the master branch but it says no commit yet since we are working on the git staging area duh! There are also other details about our files. Add and updates as many files as preferred and stage then once you have made progress or have hit a milestone — — commit.
=> git add . if you want to collectively stage all updates.
=>git commit -m “added readme.md” .When we commit our changes we’ll create our initial checkpoint and save our project remotely. m stands for message — it accurately describes your update(s) and should be 50 characters long.
Hurray :-) You have your first repo!!!
if you go to =>git status. Nothing is there anymore!