We Need to Go Deeper

  • Home

  • Tags

  • Categories

  • Archives

  • Search

Git Use

Posted on 2019-03-10 | In Git

Quick guide book:

Clone repo

1
$ git clone

Initialize new repo

Initialize and push it to a new repo in Github

1
2
3
4
5
6
$ git init
$ git remote add origin https://github.com/ShuoGH/REPONAME.git

# add the repo in the github website in advance
$ git push -u origin master # first to push
$ git push origin master #after the first time

Branch

Some commend about the branches:

List branches:

1
git branch -a

Check out branch

If you want to checkout to a branch directly, just use:

1
git checkout origin/xxbranch

To create a local branch,

1
2
3
4
5
git checkout -b xx origin/xxbranch
# or use
git checkout -t origin/xxbranch` # it will create a branch with same name.
# or use `fetch`
git fetch origin xxbranch:xx # (in this way, it won't checkout to the new branch automatically)

Delete branch

To delete the remote branch:

1
git push <remote_name> --delete <branch_name>

Operation on Files

To rm the local file and make the change into git:

1
2
git rm xx 
git commit -m "xxxx"

Show the git tree

1
git log --graph --pretty=oneline --abbrev-commit

Hello World

Posted on 2019-03-10 | In Hexo

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

If you want to write a draft

1
$ hexo new draft "My New Draft"

More info: Writing

Run server

1
2
3
$ hexo server
or
$ hexo s

More info: Server

Generate static files

1
2
3
$ hexo generate
or
$ hexo g

More info: Generating

Deploy to remote sites

1
2
3
$ hexo deploy
or
$ hexo d

Before deployment, you’d better use

1
$ hexo clean

Change the display in Home page

If you don’t want to show the full article, it can be realised by modifying the setting
auto_excerpt in the _config.yml file.

More info: Deployment

1…67
Shuo An

Shuo An

62 posts
13 categories
19 tags
GitHub E-Mail
© 2019 Shuo An
Powered by Hexo v3.9.0
|
Theme – NexT.Pisces v7.0.1
|