Git

Bash-readline

快捷键作用
Ctrl + A跳到行首
Ctrl + E跳到行尾
Ctrl + B光标左移一个字符
Ctrl + F光标右移一个字符
Alt + B左跳一个单词
Alt + F右跳一个单词
Ctrl + U删掉光标前面全部内容
Ctrl + K删掉光标后面全部内容
Ctrl + W向左删掉一个单词

ssh-pull

1
2
3
4
5
6
7
8
9
git config --global user.email  "add164@gmail.com"
git config --global user.name "add164"
//初始化本地的repository
git init
git add . 
git commit -m "My first commit"
git branch -M main
git remote add origin git@github.com:he/he.git
git push -u origin main

configure

1
2
3
git config --global user.name " name"
git config --global user.email "email "
git config --global color.ui auto

status

git status git diff git diff --staged

remote

  1. 查看remote git remote -v
  2. 移除remote git remote remove origin

branch

git branch git branch -a

clone

git clone不包含仓库名字目录 git clone git@github.com:xx/xx.github.io.git ./

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Load Days...Load HMS...
Built with Hugo