首先克隆分支:
:git clone https://github.com/LLLUZHAO/Test.git
正克隆到 'Test'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
展开对象中: 100% (3/3), 完成.
创建新的分支并切换到新分支:
:cd Test
:git branch zhaolu
:git checkout zhaolu
切换到分支 'zhaolu'
:git branch
master
* zhaolu
:cat 1
:cat << EOF > 1
> lurongming
> EOF
看看工作区与暂存区的区别:
:git diff
diff --git a/1 b/1
index e69de29..8c7346e 100644
--- a/1
+++ b/1
@@ -0,0 +1 @@
+lurongming
工作区与最新本地仓库的区别:
:git diff HEAD