git的常用命令(安装、建仓库、添加、提交、查询历史版本)

本文介绍了如何在Mac上安装Git,检查安装是否成功,以及如何在本地创建新的Git仓库。详细阐述了git add、git commit、git status和git log的使用,并解释了如何通过git reset --hard来回滚版本。此外,还提到了git diff和工作区、暂存区的概念。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近工作中用到git,其实之前也用过,但是忘的差不多了。现在再来复习一下。

参考了廖老师的网站

 

【我的环境】

我的使用的是2019最新版13.3寸的MacBook Pro。系统是10.15.1。

chens-MacBook-Pro:~ chenchen$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.1
BuildVersion:	19B88
chens-MacBook-Pro:~ chenchen$ 

 

第一步, 【安装git】

先百度git,第一个结果是git官网,点击进入。

进入如下页面,选左下角 Download,进入新页面。

然后选对应的操作系统,我选Mac OS X,

然后,会下载一个dmg文件,下载成功后,双击安装一步步进行下去直到完成即可。

同时你还可以下载git的pdf教程。

 

【检查是否安装成功】

可以在terminal里输入git 然后回车。如果显示内容如下所示,则安装成功。

 

第二步,是在本地新建git仓库】

使用 git init,这时会看到当前目录下出现  .git  。

chens-MacBook-Pro:~ chenchen$ ls
Desktop		Downloads	Movies		Pictures
Documents	Library		Music		Public
chens-MacBook-Pro:~ chenchen$ pwd
/Users/chenchen
chens-MacBook-Pro:~ chenchen$ mkdir learn_git
chens-MacBook-Pro:~ chenchen$ pwd
/Users/chenchen
chens-MacBook-Pro:~ chenchen$ cd learn_git/
chens-MacBook-Pro:learn_git chenchen$ pwd
/Users/chenchen/learn_git
chens-MacBook-Pro:learn_git chenchen$ git init
Initialized empty Git repository in /Users/chenchen/learn_git/.git/
chens-MacBook-Pro:learn_git chenchen$ ls -al
total 0
drwxr-xr-x   3 chenchen  staff   96 Nov 30 18:36 .
drwxr-xr-x+ 21 chenchen  staff  672 Nov 30 18:35 ..
drwxr-xr-x  10 chenchen  staff  320 Nov 30 18:36 .git

 

第三步,现在你就可以在刚才init的目录新建文本文件然后提交了。

每次提交都是 git add  git commit,注意git status的使用。

git add是把工作区的修改,添加到暂存区。

git commit是把暂存区的修改提交到master分支。

下面展示的是

chens-MacBook-Pro:learn_git chenchen$  vi readme 
chens-MacBook-Pro:learn_git chenchen$ cat readme
Git is a distributed version control system.
Git is free software distributed under the GPL

add fourth
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   readme

no changes added to commit (use "git add" and/or "git commit -a")
chens-MacBook-Pro:learn_git chenchen$ git add readme 
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   readme

chens-MacBook-Pro:learn_git chenchen$ git commit -m" add fourth"
[master ff3af09]  add fourth
 Committer: chen chen <chenchen@chens-MacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 2 insertions(+)
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
nothing to commit, working tree clean
chens-MacBook-Pro:learn_git chenchen$ 

从上面可以看到不同状态下,git status会输出什么。

比如添加了文件,但是没有git add。或者git add了,但是没有git commit。以及最后git commit了,输出git status会有什么。

 

【四个版本】作为参考。

版本4: add fourth

********

 

 

 

【查询历史版本:git log 】

注意git log只是从当前版本一直到 最早的版本之间的历史记录。

比如你总共commit了4次,如果当前head执行最新的版本,那么你git log有4个记录。

但是如果你把head指针指向第二次commit的版本,这时候你git log只有2个记录。

 下面就展示了git log在head指向不同版本时显示的不同结果。

chens-MacBook-Pro:learn_git chenchen$ git  log
commit d59239837dcf559599ed594c5c25b89a68140359 (HEAD -> master)
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:40:49 2019 +0800

    wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ git reset --hard  ff3af0
HEAD is now at ff3af09  add fourth
chens-MacBook-Pro:learn_git chenchen$ git log
commit ff3af093133211ec8c97ed8f866f871d89a3d7cb (HEAD -> master)
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 19:08:37 2019 +0800

     add fourth

commit 5940bacd67e4c2091d6f641c43820549ba4d3324
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:50:52 2019 +0800

    append GPL

commit f117994c2abe604b8ab6e96de6fe5f7a3dcafe01
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:45:53 2019 +0800

     add distributed

commit d59239837dcf559599ed594c5c25b89a68140359
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:40:49 2019 +0800

    wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ git reset --hard f1179
HEAD is now at f117994  add distributed
chens-MacBook-Pro:learn_git chenchen$ git log
commit f117994c2abe604b8ab6e96de6fe5f7a3dcafe01 (HEAD -> master)
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:45:53 2019 +0800

     add distributed

commit d59239837dcf559599ed594c5c25b89a68140359
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:40:49 2019 +0800

    wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ 

 这里的 append GPL、add distributed、wrote a readme file 都是提交时自己写的 comment。

注意commit后面的一长串字符,这个就是版本号,是md5编码的。

当我们要查看具体的某一个版本时,

chens-MacBook-Pro:learn_git chenchen$ git log
commit ff3af093133211ec8c97ed8f866f871d89a3d7cb (HEAD -> master)
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 19:08:37 2019 +0800

     add fourth

commit 5940bacd67e4c2091d6f641c43820549ba4d3324
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:50:52 2019 +0800

    append GPL

commit f117994c2abe604b8ab6e96de6fe5f7a3dcafe01
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:45:53 2019 +0800

     add distributed

commit d59239837dcf559599ed594c5c25b89a68140359
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:40:49 2019 +0800

    wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ git reset --hard f1179
HEAD is now at f117994  add distributed
chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a distributed version control system.
Git is free software.
chens-MacBook-Pro:learn_git chenchen$ git reset --hard d5923
HEAD is now at d592398 wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a version control system.
Git is free software.
chens-MacBook-Pro:learn_git chenchen$ 

通过版本号找具体的某一个版本时,只需要“ git reset  --hard 版本号的前几个字符”即可。

前几个字符,最好四五个吧,两三个好像会报错,你可以试试看。

 

 

 

如果只想显示少量的log信息,可以加上参数

--pretty=oneline

git log --pretty=oneline
chens-MacBook-Pro:learn_git chenchen$ git reset --hard ff3af0
HEAD is now at ff3af09  add fourth
chens-MacBook-Pro:learn_git chenchen$ git log --pretty=oneline
ff3af093133211ec8c97ed8f866f871d89a3d7cb (HEAD -> master)  add fourth
5940bacd67e4c2091d6f641c43820549ba4d3324 append GPL
f117994c2abe604b8ab6e96de6fe5f7a3dcafe01  add distributed
d59239837dcf559599ed594c5c25b89a68140359 wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ 

 

 

 

【git reset --hard head^ 】命令的使用。

head^ 是指head指针所指版本的前一个版本。或者说当前版本的前一个版本。

 

chens-MacBook-Pro:learn_git chenchen$ git log
commit ff3af093133211ec8c97ed8f866f871d89a3d7cb (HEAD -> master)
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 19:08:37 2019 +0800

     add fourth

commit 5940bacd67e4c2091d6f641c43820549ba4d3324
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:50:52 2019 +0800

    append GPL

commit f117994c2abe604b8ab6e96de6fe5f7a3dcafe01
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:45:53 2019 +0800

     add distributed

commit d59239837dcf559599ed594c5c25b89a68140359
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:40:49 2019 +0800

    wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ git reset --hard head^
HEAD is now at 5940bac append GPL
chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a distributed version control system.
Git is free software distributed under the GPL
chens-MacBook-Pro:learn_git chenchen$ git reset --hard head^
HEAD is now at f117994  add distributed
chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a distributed version control system.
Git is free software.
chens-MacBook-Pro:learn_git chenchen$ git reset --hard head^
HEAD is now at d592398 wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a version control system.
Git is free software.
chens-MacBook-Pro:learn_git chenchen$ git reset --hard head^
fatal: ambiguous argument 'head^': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
chens-MacBook-Pro:learn_git chenchen$ 

 

 

git reset --hard head^^    

这里的head^^是指当前版本的上上个版本

chens-MacBook-Pro:learn_git chenchen$ git log
commit ff3af093133211ec8c97ed8f866f871d89a3d7cb (HEAD -> master)
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 19:08:37 2019 +0800

     add fourth

commit 5940bacd67e4c2091d6f641c43820549ba4d3324
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:50:52 2019 +0800

    append GPL

commit f117994c2abe604b8ab6e96de6fe5f7a3dcafe01
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:45:53 2019 +0800

     add distributed

commit d59239837dcf559599ed594c5c25b89a68140359
Author: chen chen <chenchen@chens-MacBook-Pro.local>
Date:   Sat Nov 30 18:40:49 2019 +0800

    wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ git reset --hard head^^
HEAD is now at f117994  add distributed
chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a distributed version control system.
Git is free software.
chens-MacBook-Pro:learn_git chenchen$ 

 

如果你从新版本,移动head指针到了老版本。 再想回到最新版本该怎么办呢?

使用git reflog命令。

它记录了所有git 版本切换的历史命令。

如果想找最新的版本,你就找最新的那个版本对应的注释,就是你提交最新版本时写的message。我这里最新的版本写的message是“add fourth”,所以从git reflog中我发现最新的“ff3af09 HEAD@{2}: commit: add fourth”这里就可以看出最新的版本的commit_id是什么。

chens-MacBook-Pro:learn_git chenchen$ git reflog
d592398 (HEAD -> master) HEAD@{0}: reset: moving to d5923
f117994 HEAD@{1}: reset: moving to f1179
ff3af09 HEAD@{2}: commit: add fourth
5940bac HEAD@{3}: reset: moving to 5940ba
f117994 HEAD@{4}: reset: moving to f1179
d592398 (HEAD -> master) HEAD@{5}: reset: moving to d592
5940bac HEAD@{6}: reset: moving to 5940ba
d592398 (HEAD -> master) HEAD@{7}: reset: moving to head~1
f117994 HEAD@{8}: reset: moving to HEAD^
5940bac HEAD@{9}: commit: append GPL
f117994 HEAD@{10}: commit: add distributed
d592398 (HEAD -> master) HEAD@{11}: commit (initial): wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ 

 

下面说一下 git diff 这个命令

这个命令可以展示工作区的文件暂存区的内容之间的区别

示例1:修改文件--git diff有展示;

示例2:修改文件--git add--git diff无展示;

示例3:修改1--git diff有展示--git add--git diff无展示--修改2--git diff有展示--git commit有展示;

chens-MacBook-Pro:learn_git chenchen$ touch file2
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	file2

nothing added to commit but untracked files present (use "git add" to track)
chens-MacBook-Pro:learn_git chenchen$ vi file2 #写1
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	file2

nothing added to commit but untracked files present (use "git add" to track)
chens-MacBook-Pro:learn_git chenchen$ git diff
chens-MacBook-Pro:learn_git chenchen$ git add file2 
chens-MacBook-Pro:learn_git chenchen$ git diff
chens-MacBook-Pro:learn_git chenchen$ vi file2 #写2
chens-MacBook-Pro:learn_git chenchen$ git diff
diff --git a/file2 b/file2
index d474e1b..1191247 100644
--- a/file2
+++ b/file2
@@ -1,2 +1,2 @@
 1
-
+2
chens-MacBook-Pro:learn_git chenchen$ vi file2 #写3
chens-MacBook-Pro:learn_git chenchen$ git diff
diff --git a/file2 b/file2
index d474e1b..01e79c3 100644
--- a/file2
+++ b/file2
@@ -1,2 +1,3 @@
 1
-
+2
+3
chens-MacBook-Pro:learn_git chenchen$ git add file2 #add 2 3 
chens-MacBook-Pro:learn_git chenchen$ git diff
chens-MacBook-Pro:learn_git chenchen$ vi file2 #写4
chens-MacBook-Pro:learn_git chenchen$ git diff
diff --git a/file2 b/file2
index 01e79c3..94ebaf9 100644
--- a/file2
+++ b/file2
@@ -1,3 +1,4 @@
 1
 2
 3
+4
chens-MacBook-Pro:learn_git chenchen$ git commit -m"4"#提交2 3 
[master bd6f2bd] 4
 Committer: chen chen <chenchen@chens-MacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 3 insertions(+)
 create mode 100644 file2
chens-MacBook-Pro:learn_git chenchen$ git diff #4没有add,上一次add的是2 3 
diff --git a/file2 b/file2
index 01e79c3..94ebaf9 100644
--- a/file2
+++ b/file2
@@ -1,3 +1,4 @@
 1
 2
 3
+4
chens-MacBook-Pro:learn_git chenchen$ 

 

但是当你改变了head指针,你的diff就没了。

chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a distributed version control system.
Git is free software distributed under the GPL

add fourth
chens-MacBook-Pro:learn_git chenchen$ vi readme 
chens-MacBook-Pro:learn_git chenchen$ git diff
diff --git a/readme b/readme
index 055d5c6..70c26b0 100644
--- a/readme
+++ b/readme
@@ -2,3 +2,4 @@ Git is a distributed version control system.
 Git is free software distributed under the GPL
 
 add fourth
+add fifth
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   readme

no changes added to commit (use "git add" and/or "git commit -a")
chens-MacBook-Pro:learn_git chenchen$ git reset --hard d59239837dcf
HEAD is now at d592398 wrote a readme file
chens-MacBook-Pro:learn_git chenchen$ git diff
chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a version control system.
Git is free software.
chens-MacBook-Pro:learn_git chenchen$ 

 

 

git status 

理解 .git中的工作暂存区等概念。

凡是新增的文件,还没有git add过,就显示 untracked file

“Changes not staged for commit:” 这句话也显示出了:必须先staged然后再commit

chens-MacBook-Pro:learn_git chenchen$ vi readme 
chens-MacBook-Pro:learn_git chenchen$ cat readme 
Git is a distributed version control system.
Git is free software distributed under the GPL

add fifth
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   readme

no changes added to commit (use "git add" and/or "git commit -a")
chens-MacBook-Pro:learn_git chenchen$ touch LICENSE
chens-MacBook-Pro:learn_git chenchen$ vi LICENSE
chens-MacBook-Pro:learn_git chenchen$ vi LICENSE
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   readme

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	LICENSE

no changes added to commit (use "git add" and/or "git commit -a")
chens-MacBook-Pro:learn_git chenchen$ 

同时git add 两个文件

chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   readme

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	LICENSE

no changes added to commit (use "git add" and/or "git commit -a")
chens-MacBook-Pro:learn_git chenchen$ git add readme  LICENSE 
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	new file:   LICENSE
	modified:   readme

chens-MacBook-Pro:learn_git chenchen$ 

 

工作区,暂存区的概念

工作区,就是你写代码,编辑代码的地方,你在本地正常工作的地方。

暂存区,是你做了git add后的暂存区,这时候还没有到master里。

等从暂存区git commit后,才正式进入master分支。

下面是廖老师的讲解:

前面讲了我们把文件往Git版本库里添加的时候,是分两步执行的:

第一步是用git add把文件添加进去,实际上就是把文件修改添加到暂存区;

第二步是用git commit提交更改,实际上就是把暂存区的所有内容提交到当前分支。

git add之后,就等待git commit了。这时候看status

chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	new file:   LICENSE
	modified:   readme

chens-MacBook-Pro:learn_git chenchen$ git commit -m"add license , fifth"
[master 6df3293] add license , fifth
 Committer: chen chen <chenchen@chens-MacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 LICENSE
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
nothing to commit, working tree clean
chens-MacBook-Pro:learn_git chenchen$ 

 

 

为什么大家都觉得Git好用,因为“Git跟踪和管理的是修改,而不是文件”。

每次git commit提交的东西,就已经放到暂存区的修改

比如你的操作步骤是“修改1---git add---修改2---git commit” 这时你git status你会发现只提交了第一次修改。

请注意看一下:

一个文件有一部分修改git add了但是没有git commit,同时也有一部分修改没有git add时的 git status状态。

chens-MacBook-Pro:learn_git chenchen$ touch file1
chens-MacBook-Pro:learn_git chenchen$ vi file1 
chens-MacBook-Pro:learn_git chenchen$ git add file1 
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	new file:   file1

chens-MacBook-Pro:learn_git chenchen$ vi file1 
chens-MacBook-Pro:learn_git chenchen$ git status #注意看这里
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	new file:   file1

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   file1

chens-MacBook-Pro:learn_git chenchen$ cat file1
first
second
chens-MacBook-Pro:learn_git chenchen$ git commit -m"只提交第一次修改"
[master 3fd0d57] 只提交第一次修改
 Committer: chen chen <chenchen@chens-MacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+)
 create mode 100644 file1
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   file1

no changes added to commit (use "git add" and/or "git commit -a")
chens-MacBook-Pro:learn_git chenchen$ cat file1 
first
second
chens-MacBook-Pro:learn_git chenchen$ git add file1 
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   file1

chens-MacBook-Pro:learn_git chenchen$ git commit -m"提交第二次修改"
[master f3dedcf] 提交第二次修改
 Committer: chen chen <chenchen@chens-MacBook-Pro.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+)
chens-MacBook-Pro:learn_git chenchen$ git status
On branch master
nothing to commit, working tree clean
chens-MacBook-Pro:learn_git chenchen$ 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值