Switch to branch: git checkout Home >
Article > Development Tools > How to use git command Git is a distributed version control system used to track changes in the code base and enable collaborative development. Commonly used Git commands include: Initialize the code base: git init Add files to the staging area: git add ##Git Command Guide What is Git? How to use Git commands Initialize the code base: Add files to the staging area: Commit changes: Pull remote code base changes: Push local code base changes: Create branch: Switch to branch: Merge branch: Create tag: Rollback to a specific commit: View commit history: View file status: More commands: Advanced Tip: The above is the detailed content of How to use git command. For more information, please follow other related articles on the PHP Chinese website!How to use git command
<code>git init</code>
<code>git add <文件名></code>
<code>git commit -m "提交信息"</code>
<code>git pull</code>
<code>git push</code>
<code>git branch <分支名></code>
<code>git checkout <分支名></code>
<code>git merge <分支名></code>
<code>git tag <标签名></code>
<code>git reset --hard <提交哈希></code>
<code>git log</code>
<code>git status</code>
: Selectively merge commits from another branch.
: Lookup resulted in wrong commit.
: Reapply the commit to another branch.
Use the
option to view detailed output.
.