常见git指令
- git init: 创建一个新repo
- git clone: 复制一个已存在的repo
- git remote add origin <remote_url>: 添加一个远程repo, 并命名为origin.
- git branch 查看本地有哪些branch
- git branch -d/-D: 删除branch
- git switch 切换branch (指针不会指到最上面)
- git checkout 切换branch (指针到最上面)
- git add file_name: 将文件添加到staging area
- git commit -m "your commit message": 把staging area的文件commit到本地repo