Member-only story
Basic Command of Git
After one year of being all around my baby, I need to pick up some basic but essential things of git and squeeze them into my head.
git init: to initialize a new Git repository.
git initgit clone: to clone a repository on GitHub to the local machine.
git clone https://github.com/user/repository.gitgit status: to check the status of the working directory like modified files, untracked files and so on.
git statusgit add:
- git add <file> stage a specific file for the next commit.
- git add . stage all modified and untracked files for the next commit.
But I usually use GUI to select files for commit.
git add <file_name>
git add . git commit -m “commit message”: to commit the staged change with a descriptive message. Commit message can include issue numbers to show the commit in the issue history. Commit message can also include “close #no.” to close a issue.
git commit -m "commit message"




