0%

TIL 210303

Shell command
cd : change directory

mv : move

mkdir : make directory

rm/rm -rf : remove

pwd : print working directory (see the directory is now working)

touch : make a file

vi : vim mode(im not sure)

cat : concatenate (see what the file has)

ls : see the list

vim command
i : insert mode

v : visual mode

ESC : back to normal mode

d : delete

dd : delete a line

y : yank

yy : yank a line

p : paste

u : undo

a : append

A : append from end of line

o : open line(under)

O : open line(upper)

H : move to the top of the screen

L : move to the bottom of the screen

shift + y = copy a line

shift + ins = copy

alt + ins = paste

command mode
:q - quit

:q! - quit discarding all changes

:w - write

:wq - write and quit

:{number} - jump to {number}th line.

what is it?
It helps to corporate with someone and it make us efficent to manage our code.

why does it need?
when we work with colleague,we can share the part while working. I guess it is particulary helpful for agile method.

how to use git?
first, launch the git for window in the internet…

and … search on google!

start project with git init
make repo

$ mkdir first-repo && cd first-repo

$ git init

$ git remote add origin https://github.com/{Daseul-Kim}/{first-repo}.git

$ touch README.md

$ git add README.md

$ git add README.md

$ git commit -m “docs:Create README.md”

$ git push -u origin master

start project with git clone
make repo in github

git clone {repo address}

git add .

git commit

git push

make blog (by using github)
launch node.js

use hexo

enter npm install -g hexo-cli (if it needs permission, put sudo at first)

hexo into myblog (in my case : hexo-blog)

enter after put npm install

if you want to write new post : enter after hexo new post “ bla bla” and then vi source/_posts/bla-bla.md

write what you want (hexo transfer html automatically)

enter after hexo clean && hexo generate (and see generated : ~~~.html)

check your posts ( it could be local server)

let’s push it to git : we shoyld put in _config.yml below : npm install hexo-deployer-git –save

copy your github.io address

enter vi _config.yml > we need to change (row:100) >> deploy: / type: git / repo: github.io.address / branch: main >( no master!)

(row:6) title: what i want / description: ‘what i wnat, bla’ / author : Daseul-Kim / lang,time : don’t touch

(row:16) url : https://{username}.github.io

let’s check it out to push by using : enter after hexo clean && hexo deploy