GIT CMD command line
🔧 Git CMD Configuration
Set your username and email globally:
git config –global user.name “MariLT”
git config –global user.email “marilt@..”
✅ Check Configuration
To verify your settings:
git config user.name # Check username
git config user.email # Check email
git config –global –list # See all global config settings
📥 Clone a Git Repository
Clone a local repository:
git clone S:\TARGV21\ylesanne
📊 Check Git Status
Check the current state of the working directory:
git status
🌿 Branch Management
Create a new branch:
git branch MariLT
Switch to the branch:
git checkout MariLT
Delete the branch:
git branch -d MariLT
📂 Add Files
Add all changes to staging:
git add .
📝 Commit Changes
git commit -a -m “Name has been added”
If you’re pushing a new branch for the first time:
git push –set-upstream origin IrinaM
🚀 Push Changes to Server
Push to the remote repository:
git push
If you’re pushing a new branch for the first time:
git push --set-upstream origin IrinaM
🔄 Pull Updates from Server
To pull the latest changes from the main branch:
git pull origin main
🆕 Initialize a New Repository
Create a new repository locally:
git init repoName