Git使用笔记

  1. 从创建本地的br_debug分支,并且同步远程的br_debug分支。
    git checkout -b br_debug origin/br_debug
  2. 虽然只有几个字母的差别,但是效率提高还是很明显的!
    别名
  3. 修改上次的commit message
    git commit --amend
  4. 每次安装git的时候要用的
    git config --global user.name “Your Name”
    git config --global user.email "[email protected]"
  • git cherry-pick commitId
  1. 这就是windows经常提醒的那个东西
  • git config core.autocrlf true

  • git push --tags

  • git config --global core.quotepath false 修复中文乱码

  • git remote show origin,可以查看remote地址,远程分支,还有本地分支与之相对应关系等信息。

  • git remote prune origin,不显示远程已删除的分支。

  • git rebase -i commitId 用来合并多个commit

  • git lg 文件名 ,查看某个文件lg git show commitId 查看改文件某个commit改动

你可能感兴趣的:(git,git)