git 基础学习小 tip --> 初始化 git 仓库
$ cd 项目代码所在的文件夹
$ git init
$ cd 某个文件夹
$ git init your project
$ cd your project
$ git init git_learning
Initialized empty Git repository in /mnt/ISO-SP1/pub/test/git_learning/.git/
$ cd git_learning/
$ ls -la
total 0
drwxr-xr-x. 3 root root 26 Oct 20 15:05 .
drwxr-xr-x. 4 root root 58 Oct 20 15:05 ..
drwxr-xr-x. 7 root root 155 Oct 20 15:05 .git
$ git config --local user.name 'miya'
$ git config --local user.email 'miyacsdn@163.com'
$ git config --list --local
core.repositoryformatversion= 0
core.filemode= true
core.bare= false
core.logallrefupdates= true
user.name= miya
user.email= miyacsdn@163.com
$ ----------------------------------------------------------------------------
$ touch readme
$ git add readme
$ git status
On branch master
No commits yet
Changes to be committed:
( use "git rm --cached <file>..." to unstage)
new file: readme
$ git commit -m 'Add readme'
[ master ( root-commit) 10c631c] Add readme
1 file changed, 0 insertions( +) , 0 deletions( -)
create mode 100644 readme
$ git log
commit 10c631c823838f7045a2447c3ec37cc754725d90 ( HEAD -> master)
Author: miya < miyacsdn@163.com>
Date: Tue Oct 20 15:21:49 2020 +0800
Add readme