#VERSION CONTROL,GIT AND GITHUB EXPLAIN 1.What is Version Control: Is a system that tracks and collaborate effiently
2.What is Version Control Used for: conflict resulotion,collaboration,track changes and reverting to previous version.
3.What is git: A free and open source distribution system.
What is git-hub:A web that uses git for version control,used for colaboration.
Difference between git and github:Git is a free, open source version control tool that developers install locally on their personal computers, while GitHub is a pay-for-use online service built to run Git in the cloud.
#COMPREHENSIVE GIT AND GITHUB SETUP FOR BIGINNERS #note: type in commands
step1:Command to install git on your pc linux: sudo apt -get install git MacOS:brew install git
step2:check version git --version
step3:set as default editor git config --global "ursername" git config --global "urseremail"
step4:Path check git --version
step5:view your configuration setting git config --list lst all setiing displaying:name,email,ailias and default initbranch
step6:set branch name git config --global init.defaultBranch main
step7:connecting git via SSH mapping the local device to remote account generating SSH key then add to remote account
step8 #HOW TO OPEN A GIT ACCOUNT go to www.github.com click sign up set up name to convient perform a little task of identifying pictures visual or audio click verify email will be sent go to Gmail or yahoo mail to activate
note:use an active email for code generation that will be sent
input email and password
#CONNECTING REMOTE AND LOCAL ssh-keggen -t end25519 -C "youremail") Enter file in which to save the key (/home/b/.ssh/id_ed25519 key pair. click enter(as defualt) click enter type:eveal "$(SSH -agent -s)" Agent pin will display type:SSH -add ~/.SSH/id_ed25519 display: Identity added: showing /home/bin/.SSH/id_ed 25519("email")
#WE JUST ADDED AN SSH KEY TO SSH AGENT ANYTIME WE ARE ON THE INTENET MEANING WE HAVE ADDED LOCALS.
#HOW TO ADD GITHUB BELOW cat ~/.SSH/id_ed25519.pub (this will your email) copy(shift + control v) go to github profile go to setting icon and click side bar click on SSH and GPG keys click SSH and display box where numbers and alphabets are highlighted paste and click add confirm access
#COMMAND BASSIC FUCTIONS ON TERMINAL git init(innitialize git) git status(check status untracked and tracking repo) git add(to add file) git log(to check commit,author and date) git commit(to save any changes made in a file)
#TO PERFORM ANY GIT type: git init git status rm -r .git (to remove inntialization) git (to add file and also start tracking file) git add .(to add all file instead of one by one) git rm --cached {filename}(also use to remove file from index) git commit -m "intial commit" then incase of issues git revert -head "name of file"
#ALL THE PROCESS ABOVE IS ON OUR LOCALS TO MOVE TO GITHUB go to git hub go to your profile click repositories beneath your profiles click new rename(convinient name) leave on public don't click readme create repository
#mMAPPING LOCAL TO REMOTE git push(on terminal) git remote add origin (copy and paste your SSH) git push -u origin master (specifying to local repo that origin).
#FOR BRANCH (main branch as a set of code to find the root placement) git checkout -b feat/finename(-b to create a new branch from the main) git branch(display master) touch filename(to add as branch to master) git checkout(to switch branch from master to new filename and back to master) git add sub(adding filename touched) commit -m feat/filename
#ALWAYS MAKE SURE YOU READ ERRORS SHOWN INCASE OF ANY ERROR THROWN AT THIS POINT copy and paste on terminal git pull to make sure it up to date or already up to date
go to your github and it will display.
#CHALLENGES I ENCOUNTER AND HOW I FIXED IT YOU MIGHT TOO
I ran into problems installing and running Git,
Here are solutions to some of the most common issues.
note: If something doesn't work right away, try closing and reopening your terminal, or restarting your computer. Common Installation Issues "git is not recognized as an internal or external command" Solution: Git wasn't in my system's PATH. so i made sure i installed Git and restarted my terminal. If needed, add Git's bin folder (usually C:\Program Files\Git\bin) to your PATH. If it still doesn't work, try restarting your computer. #Permission errors ("Permission denied") Solution: On Windows, run Git Bash or your terminal as administrator. On macOS/Linux, use sudo if necessary. SSL or HTTPS errors when cloning/pushing Solution: Check your internet connection beacuase at some point i had network issues too. Make sure your Git version is up to date. Wrong version of Git Solution: Check your installed version with git --version.