切换用户

  • 查看当前用户
    • git config user.name
    • git config user.email
  • 切换登录用户
    • git config —global user.name ‘内容内容’
    • git config —global user.email ‘内容内容’

      更新代码

  1. git clone
  2. git pull
  3. git add .
  4. git commit -‘更新内容介绍’
  5. git push

    分支和历史

    查看远程库信息
  • git remote -v 查看远程库的详细信息

  • git checkout 分支名字
    • 切换分支
  • git branch 分支名字
    • 创建分支
  • git checkout -b 分支名字
    • 创建并切换到分支
  • git branch
    • 当前分支
  • git log
    • 历史版本