Getting started with Git

Hello! I am Nikhil Khetan I am here to explore my coding journey and write blogs on web development.
SETUP
Set a name that is identifiable for credit when review version history
git config --global user.name “[firstnamelastname]”Set an email address that will be associated with each history marker
git config --global user.email “[valid email]”
MOST COMMONLY USED GIT COMMANDS
Initialization of git
git initAdd a file as it's ready for your next commit (stage)
git add <file>Add all files as they are ready for your next commit (stage)
git add .Show modified files in working directory, staged for your next commit
git statusCommit your staged content as a new commit snapshot
git commit -m “[descriptive message]”Display the entire commit history using the default format.
git logDifference of what is changed but not staged
git diff
Pushing an existing repository to GitHub
git remote add origin https://github.com/example/test3.gitgit branch -M maingit push -u origin main
Cloning a repository
git clone https://github.com/example/test2.gitgit fetchgit merge origin/main



