Skip to the content.

Git Tips

Actions to be Taken Once the Operating System is Installed

sudo apt update
sudo apt upgrade
sudo apt install git -y
git config --global user.email "$email"
git config --global user.name "$username"

Actions to be Performed Once in Each Project

git init
git add .
git commit -m "first commit"
git remote add origin git@github.com:$username/$projectName.git
git push -u origin master
git init
git remote add origin git@github.com:$username/$projectName.git
git push -u origin master

Commands Used Every Day

git add .
git commit -m "Commit Explanation"
git push -u origin master
git pull -u origin master

When New Files Are Added to the Project

git add .

Ref: nuriakman - GitHub