Git Basics – Commands
Git Basics – Commands
Initialize Repository
git init
Check Status
git status
Add Files
git add filenamegit add .
Commit Changes
git commit -m "Add login feature"
View History
git loggit log --oneline
Difference Between add & commit
-
add→ Move changes to staging area -
commit→ Save changes permanently
Undo Changes
git checkout -- filenamegit reset HEAD filenamegit revert commit_id
Comments
Post a Comment