git-introduction
git-introduction
https://en.wikipedia.org/wiki/Linus_Torvalds
Some other commands
• git config --global user.name ‘Saqib Ali’
• git config --global user.email ‘ [email protected]’
• git branch login
• git checkout login
• git checkout master
• git merge
• git clone
• Avoid entering password – you can use ssh keys
Terminal – Unix based systems
Termina – Unix based systems like Linux or MAC
Basic Commands:
cd – change directory
cd .. Move to previous directory
mkdir – make a directory
ls – to list all files in a directory
ls –all – to list details
touch – to create a file
rm – to remove files or folders
Many more …..
Command line (CMD) - Windows
• dir – to list files or folders in a folder
• cd – change folder
• Many more
Text Editors
• Notepad
• Notepad++
• Atom
• Sublime Text
• vi ( I for insert and to write and quit :wq)
.gitignore - file
• To avoid uploading system, logs and other related files.
Remote Repository
• GitHub – recently purchased by Microsoft
• BitBucket
• Many more…..
How git and GitHub work?
Branching
Basic Commands
Git configuration from the command line:
git help config
git config -h
git config --global user.name 'Saqib Ali'
git config --global user.email '[email protected]'
git config --global init.default branch main
git diff
git push -u origin master
Basic Commands
echo "# abc" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git push -u origin main
Git Cheat Sheet – 50 Git Commands You
Should Know
https://www.freecodecamp.org/news/git-cheat-sheet/