spring@springdeMacBook-Pro halo % touch a
spring@springdeMacBook-Pro halo % git status
On branch master
Your branch is up to date with ‘origin/master’.
Changes to be committed:
(use “git reset HEAD
new file: ../halo-bak/halo-bak
spring@springdeMacBook-Pro halo % ls -l
total 120
-rw-r—r— 1 spring staff 1070 9 1 14:55 LICENSE
-rw-r—r— 1 spring staff 28963 9 1 14:55 README.md
-rw-r—r— 1 spring staff 22063 9 1 14:55 _config.yml
-rw-r—r— 1 spring staff 0 9 1 15:05 a
drwxr-xr-x 4 spring staff 128 9 1 14:55 config
drwxr-xr-x 4 spring staff 128 9 1 14:55 languages
drwxr-xr-x 20 spring staff 640 9 1 14:55 layout
drwxr-xr-x 7 spring staff 224 9 1 14:55 source
spring@springdeMacBook-Pro halo % git add .
fatal: in unpopulated submodule ‘themes/halo’
spring@springdeMacBook-Pro halo % ls -l
total 120
-rw-r—r— 1 spring staff 1070 9 1 14:55 LICENSE
-rw-r—r— 1 spring staff 28963 9 1 14:55 README.md
-rw-r—r— 1 spring staff 22063 9 1 14:55 _config.yml
-rw-r—r— 1 spring staff 0 9 1 15:05 a
drwxr-xr-x 4 spring staff 128 9 1 14:55 config
drwxr-xr-x 4 spring staff 128 9 1 14:55 languages
drwxr-xr-x 20 spring staff 640 9 1 14:55 layout
drwxr-xr-x 7 spring staff 224 9 1 14:55 source
spring@springdeMacBook-Pro halo % pwd
/Users/spring/hexo/blog/themes/halo
spring@springdeMacBook-Pro halo % pwd
/Users/spring/hexo/blog/themes/halo
spring@springdeMacBook-Pro halo % cd ..
spring@springdeMacBook-Pro themes % ls -l
total 0
drwxr-xr-x 10 spring staff 320 9 1 15:05 halo
drwxr-xr-x 3 spring staff 96 9 1 14:47 halo-bak
drwxr-xr-x 12 spring staff 384 9 1 14:53 landscape
spring@springdeMacBook-Pro themes % git rm -r –cached halo
fatal: pathspec ‘–cached’ did not match any files //-命令不对
spring@springdeMacBook-Pro themes % git rm -r –cached halo/
fatal: pathspec ‘–cached’ did not match any files
spring@springdeMacBook-Pro themes % git –cached halo/
git: ‘–cached’ is not a git command. See ‘git —help’.
spring@springdeMacBook-Pro themes % git —cached halo/
unknown option: —cached
usage: git [—version] [—help] [-C
[—exec-path[=
[-p | —paginate | -P | —no-pager] [—no-replace-objects] [—bare]
[—git-dir=
spring@springdeMacBook-Pro themes % git git rm -r —cached halo/
git: ‘git’ is not a git command. See ‘git —help’.
The most similar command is
init
spring@springdeMacBook-Pro themes %
spring@springdeMacBook-Pro themes % **git rm -r —cached halo/**
rm ‘themes/halo’
spring@springdeMacBook-Pro themes % ls -l
total 0
drwxr-xr-x 10 spring staff 320 9 1 15:05 halo
drwxr-xr-x 3 spring staff 96 9 1 14:47 halo-bak
drwxr-xr-x 12 spring staff 384 9 1 14:53 landscape
spring@springdeMacBook-Pro themes % ls -la halo
total 120
drwxr-xr-x 10 spring staff 320 9 1 15:05 .
drwxr-xr-x 5 spring staff 160 9 1 14:53 ..
-rw-r—r— 1 spring staff 1070 9 1 14:55 LICENSE
-rw-r—r— 1 spring staff 28963 9 1 14:55 README.md
-rw-r—r— 1 spring staff 22063 9 1 14:55 _config.yml
-rw-r—r— 1 spring staff 0 9 1 15:05 a
drwxr-xr-x 4 spring staff 128 9 1 14:55 config
drwxr-xr-x 4 spring staff 128 9 1 14:55 languages
drwxr-xr-x 20 spring staff 640 9 1 14:55 layout
drwxr-xr-x 7 spring staff 224 9 1 14:55 source
spring@springdeMacBook-Pro themes % git status
On branch master
Your branch is up to date with ‘origin/master’.
Changes to be committed:
(use “git reset HEAD
renamed: halo -> halo-bak/halo-bak
Untracked files:
(use “git add
halo/
spring@springdeMacBook-Pro themes % cd halo
spring@springdeMacBook-Pro halo % ls -l
total 120
-rw-r—r— 1 spring staff 1070 9 1 14:55 LICENSE
-rw-r—r— 1 spring staff 28963 9 1 14:55 README.md
-rw-r—r— 1 spring staff 22063 9 1 14:55 _config.yml
-rw-r—r— 1 spring staff 0 9 1 15:05 a
drwxr-xr-x 4 spring staff 128 9 1 14:55 config
drwxr-xr-x 4 spring staff 128 9 1 14:55 languages
drwxr-xr-x 20 spring staff 640 9 1 14:55 layout
drwxr-xr-x 7 spring staff 224 9 1 14:55 source
spring@springdeMacBook-Pro halo % cd ..
spring@springdeMacBook-Pro themes % git add .
spring@springdeMacBook-Pro themes % ls -l
total 0
drwxr-xr-x 10 spring staff 320 9 1 15:05 halo
drwxr-xr-x 3 spring staff 96 9 1 14:47 halo-bak
drwxr-xr-x 12 spring staff 384 9 1 14:53 landscape
spring@springdeMacBook-Pro themes % git status
On branch master
Your branch is up to date with ‘origin/master’.
Changes to be committed:
(use “git reset HEAD
renamed: halo -> halo-bak/halo-bak
new file: halo/LICENSE
new file: halo/README.md
spring@springdeMacBook-Pro themes %
spring@springdeMacBook-Pro themes %
spring@springdeMacBook-Pro themes % git commit -m “halo-cache”
[master 1326941] halo-cache
198 files changed, 25301 insertions(+)
rename themes/{halo => halo-bak/halo-bak} (100%)
create mode 100644 themes/halo/LICENSE
create mode 100644 themes/halo/README.md
create mode 100644 themes/halo/_config.yml
create mode 100644 themes/halo/a
create mode 100644 themes/halo/config/scaffolds/draft.md
spring@springdeMacBook-Pro themes %
spring@springdeMacBook-Pro themes %
spring@springdeMacBook-Pro themes % git status
On branch master
Your branch is ahead of ‘origin/master’ by 1 commit.
(use “git push” to publish your local commits)
nothing to commit, working tree clean
spring@springdeMacBook-Pro themes % git remote
origin
spring@springdeMacBook-Pro themes % git remote -vv
origin https://github.com/future1314/blog.git (fetch)
origin https://github.com/future1314/blog.git (push)
spring@springdeMacBook-Pro themes %
spring@springdeMacBook-Pro themes %
spring@springdeMacBook-Pro themes % git push
Enumerating objects: 256, done.
Counting objects: 100% (256/256), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (224/224), done.
Writing objects: 100% (254/254), 5.02 MiB | 334.00 KiB/s, done.
Total 254 (delta 10), reused 241 (delta 9)
remote: Resolving deltas: 100% (10/10), completed with 1 local object.
To https://github.com/future1314/blog.git
d694e47..1326941 master -> master
spring@springdeMacBook-Pro themes % git remote -vv
origin https://github.com/future1314/blog.git (fetch)
origin https://github.com/future1314/blog.git (push)
spring@springdeMacBook-Pro themes % git status
On branch master
Your branch is up to date with ‘origin/master’.
nothing to commit, working tree clean