Git: 版本控制(2)

2019-03-20  本文已影响0人  柏龙

.gitignore 忽略跟踪文件

.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

git init 初始化 git 仓库

git commit 提交

.DS_Store
On branch master
No commits yet
Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
    new file:   git.md
Untracked files:
  (use "git add <file>..." to include in what will be committed)
    .gitignore
[master (root-commit) 5eedcb3] add git.md
 1 file changed, 36 insertions(+)
 create mode 100644 git.md
On branch master
nothing to commit, working tree clean

git log 查看以往的提交

commit 455e903c6324ac0fd63c995dc2ca1ccaeb3ee954 (HEAD -> master)
Author: 柏龙 <lonbolong@outlook.com>
Date:   Wed Mar 20 22:49:52 2019 +0800

    add .gitignore

commit 5eedcb3a8d46d5c28ea67018b2c6400f7b2fef42
Author: 柏龙 <lonbolong@outlook.com>
Date:   Wed Mar 20 22:47:36 2019 +0800

    add git.md
(END)
上一篇下一篇

猜你喜欢

热点阅读