Skip to content

Instantly share code, notes, and snippets.

@mfine2
Created August 20, 2013 17:35
Show Gist options
  • Save mfine2/6284630 to your computer and use it in GitHub Desktop.
Save mfine2/6284630 to your computer and use it in GitHub Desktop.
cd
mkdir git-demo-01
cd git-demo-01
git status #查看版本库和所有工作目录树的差异
git init # 初始化版本库
git status #查看初始化后的提示
echo "hello git" > hello #创建文件hello,内容为hello git
git add hello #将hello增加到暂存区
git diff #查看暂存区与工作目录树的区别
git status #查看
echo "nice to meet you, git" >> hello
git diff #查看暂存区与工作目录树的区别
git status #查看
git add hello
git diff #查看暂存区与工作目录树的区别
git status #查看
git commit -m "init"
git diff #查看暂存区与工作目录树的区别
git status #查看
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment