Week 01 - Git Commands
Here are ten essential Git commands with their shortcuts:
git status → Shows the working tree status
git add file-name → Adds chosen file to staging area git add . → Adds all files shown in git status to staging area
git commit -m “note on what you did”→ Records changes to the repository
git checkout → Switches branches or restores files
git branch → Lists, creates, or deletes branches
git log --oneline → Shows commit history in compact format
git diff → Shows changes between commits or working tree
git pull → Fetches and merges from remote repository
git push → Updates remote repository with local commits
git remote -v →Shows remote repository URLs
To set up a shortcut: make a Git alias:
git config --global alias.shortcut-name original-longer-command