git 配置

2021-10-25 100

gtihub使用及配置

  • 使用

Workspace:工作区

Index / Stage:暂存区

Repository:仓库区(或本地仓库)

Remote:远程仓库

不常用:

  • 清空工作区和暂存区
    • git checkout . +
    • (已经add)git reset .

慎用:

  • git -d clean -f
head index work dir wd safe
Commit Level
reset --soft [commit] REF NO NO YES
reset [commit] REF YES NO YES
reset --hard [commit] REF YES YES NO
checkout [commit] HEAD YES YES YES
  • 查看
    git config --list

  • 配置

    1. git config --global user.name "BUG-Hunter"
    2. git config --global user.email "bug-hunterl@qq.com"
    3. 重新git后生效