When we open our terminal is important know that when we create git repository it will have our iD that is compound of our alias and Gmail.
💥In git, we have 3 levels of herarchy, local, global and system.
💥A simple dir have a local reach for example.
💥All our OS user inside have a global reach.
💥All inside our OS have a system reach.
💥With "git config" we can set the reach that we will use to work:
git config --local
git config --global
git config --local
💥We can config our global user name in git using:
git config --global [user.name](http://user.name/) "git user name"
💥And for set our mail:
git config --global user.email "git mail"
💥When we work with git we usually work with a code editor too, we have to config were code editor we'll use:
For put like editor vs code:
git config --global core.user "code --wait"
#The "--wait" is for load our editor once we stop to use it.
💥If we want to activate our colors in our IU we write:
git config --global color.ui true
💥Basically in windows we have 2 special and hidden chars for give a line jump and a reset with some concept called carriage return linefield.
💥(crlf) this makes a line jump but returning to the start of where we start to write.
💥This concept is more the concat of the linefield that is for only go down the currently writing line, and the carriage return, that take us again to the start of the line.
💥This is a special feature of windows operative system , beacause in linux or mac works diferent.
💥"\r" in windows is the carriage return.
💥"\n" in windows is the linefield.
💥This is important because when we will work with linux or mac repos we have to get the carriage return and our linefield in our git for don't have troubles working with that.
💥We write if we are using windows this:
git config --global core.autocrlf true
💥We write this if we are in linux or mac:
git config --global core.autocrlf input
Creating and understanding our first repo:

💥The staging area is for valid where our changes of our project is ready for upload our server.
💥The final repo is the part were is our final project.

💥For create a git repo we enter in directory were we need to use it and write:
git init
Making this we create all the internal structure in our dir for manage our git repository.
💥Git bash is based in Linux, so we move equal in this terminal.
A git branch is like a time line.
💥For put inside a file in the staging area we write:
git add name_file
💥Example:
git add index.js
💥For see how is our git status:
git status
💥For remove a file of the stagging area:
git rm --cached prove.py
💥All files in red when see our git status are out of our work flow in git.
💥We write for commit a new file in repo:
git commit
💥The commit works uploading all in stagging area to repo
💥For add a message in our commit we can use the wildcard -m
git commit -m "Hi, there's our first commit"
The git commits have to get a lot of details like:
💥What commited file do.
💥Reasons for commit
💥And general details of file in the project git repo
Is not recommended modify the last commit because we are removing the last element for generate a new commit to add to our master branch.
We can use this ONLY with the last commits:
git commit -amend
we can use —soft wild card for move the head of our branch of our commit area and let a copy in the staging area for be modified and commited:
git reset --soft e4rxt
If we want reset our head an specific amount of commits back we do:
git reset --soft head~3
3 is the amount of commits that we go back.
We can use git reset mixed for remove all commits after the selected new head: