By Samkb420 And Dsc Laikipia University Club. Happy learnig this is for Dsc Laikipia club,To help build and learn programing together.Its not limited to ather learners welcome and lets learn together.
Version Control System(VCS) for tracking changes in computer files
Git is distributed version Control System that is available for Mac,windows and Linux.
Open browser an type the following.
Go to https://git-scm.com/download/mac
open terminal and type the following
sudo apt-get install git
open terminal and type the following
sudo yum install git
Go to https://git-scm.com/win
Open terminal and lets check the version
locolhost@samkb420-git --versiongit version 2.21.0.windows.1
All ready let now start using git
locolhost@samkb420-git initInitialized empty Git repository in C:/Users/Samkb420/git/.git/
locolhost@samkb420-git config --global user.name 'samkb420'locolhost@samkb420-git config --global user.email 'kagosamuel01@yahoo.com'
git add <file>
ie git add index.html
git add .
to add all files git add .
locolhost@samkb420-& git add .
This is to check status of Working Tree
locolhost@samkb420-& git statusOn branch masterNo commits yetChanges to be committed:(use "git rm --cached <file>..." to unstage)new file: index.htmllocolhost@samkb420-&
This is to Commit Changes in index
locolhost@samkb420-& git commit -m "added index.html"[master (root-commit) 7ff22da] added index.html1 file changed, 0 insertions(+), 0 deletions(-)create mode 100644 index.html
This is to send code or work to remote area or servers ie Github,Heroku or Google Cloud.
For example lets say that We are developers and working on a web app that contains frontend and backend and lets say kelvinHalx works with frontend where he uses bootstrap4 and html for design and kelyn works with backend with python Flask framework And lets say sam is The project lead.They will push there code and sam will merge changes on the files and by the end of the day it will be a complete function web deployed and running.
locolhost@samkb420-& git push -u origin master
This is to pull the latest from Remote Repository
locolhost@samkb420-& git pull https://github.com/samkb420/Hellow-world.git
locolhost@samkb420-& git clone https://github.com/samkb420/Hellow-world.git