top of page

March 25, 2025
The Most Common Git Commands
user type, orphan branch, gitignore updates
The most common Git commands
Â
user configuration
list and set user credentials globally or locally (for the current working directory)
git config --list --global
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
git config --list --local
git config --local user.name "Your Name"
git config --local user.email "your_email@example.com"
after the set up, quit the git pager (which is called Less) by q command
Â
initializing git in the current working directory
git init
git add .
git commit -m "initial commit"
git remote add origin <remote-repository-URL>
git push -u origin master
removing git tracking from the current working directory
rm -rf .git
Â
bottom of page