Home  >  Article  >  Development Tools  >  What are the six commonly used commands in Git?

What are the six commonly used commands in Git?

Guanhui
GuanhuiOriginal
2020-07-18 16:03:159223browse

What are the six commonly used commands in Git?

#What are the six commonly used commands in Git?

1. "git clone" to clone the code; 2. "git log" to view the log; 3. "git tag" to view the tag; 4. "git branch" to view the branch; 5. "git branch" -a" to view the remote branch; 6. "git pull" to pull.

Git clone

# 默认在当前目录下创建和版本库名相同的文件夹并下载版本到该文件夹下
$ git clone <远程仓库的网址>

# 指定本地仓库的目录
$ git clone <远程仓库的网址> <本地目录>

# -b 指定要克隆的分支,默认是master分支
$ git clone <远程仓库的网址> -b <分支名称> <本地目录>

Recommended tutorial: " Programming Video"

The above is the detailed content of What are the six commonly used commands in Git?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn