Basic Git commands

git status

The first and most commonly used Git command is git status.

git status displays the state of the working tree (and of the staging area). It lets you see which changes are currently being tracked by Git, so you can decide whether you want to ask Git to take another snapshot.

git add

git add is the command you use to tell Git to start keeping track of changes in certain files.

The technical term is staging these changes. You'll use git add to stage changes to prepare for a commit. All changes in files that have been added but not yet committed are stored in the staging area.

git commit

After you've staged some changes for commit, you can save your work to a snapshot by invoking the git commit command.


要查看或添加评论,请登录

Qadir Hassan的更多文章

社区洞察

其他会员也浏览了