GIT For Beginner

GIT For Beginner

How to install git on Linux

# update the machine
sudo apt update

# install git on the machine
sudo apt install git-all

How to check git version

git --version

How to hide files in git

to hide files in git, we add name of that file in the .gitignore file and this file is pushed to the git.

# adding files to gitignore file
echo "file-name" >> .gitignore
# tell git to start tracking the gitignore file
git add .gitignore
# push the files changes to the remote
git commit -m "gitignore files added"