美文网首页
Git 相关

Git 相关

作者: 这个懒虫不太懒 | 来源:发表于2018-12-10 18:55 被阅读0次
git config --global user.name 范圣帅
git config --global user.email fanshengshuai@gmail.com
git config --global core.editor vim
git config --global merge.tool vimdiff
git config --global color.ui true
git config --system alias.st status     #git st
git config --system alias.ci commit   #git commit
git config --system alias.co checkout  #git co
git config --system alias.br branch  #git branch
git config core.filemode false # 忽略权限变化
git config --global core.autocrlf false # 换行符
git config --global core.safecrlf true # 检查换行符
git config receive.denycurrentbranch ignore # 设置可以 push
git config branch.master.remote origin # 默认 pull
git config branch.master.merge refs/heads/master
# 配置一个git lg 用来显示分支图
git config --global alias.lg "log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" 
git config --global push.default simple 
git config --list
# vs中每次更新代码都会要输入账号密码,配置GIT记住密码账号。
git config --global credential.helper store

回滚到指定的版本

git reset --hard e377f60e28c8b84158
git checkout .
git clean -df
git push -f origin master

一、AutoCRLF

提交时转换为LF,检出时转换为CRLF

git config --global core.autocrlf true

提交时转换为LF,检出时不转换

git config --global core.autocrlf input

提交检出均不转换

git config --global core.autocrlf false

二、SafeCRLF

拒绝提交包含混合换行符的文件

git config --global core.safecrlf true

允许提交包含混合换行符的文件

git config --global core.safecrlf false

提交包含混合换行符的文件时给出警告

git config --global core.safecrlf warn

相关文章

  • git基本命令

    git常用命令 git丢弃更改相关 git连接远程仓库相关 git切换分支相关 git stash相关 git标签相关

  • 前端 | Git的学习

    文章目录 Git相关命令 Git相关命令 git init :初始化本地git目录,生成 .git 文件夹 git...

  • 2019-06-26: Git 相关?

    一:Git相关 '--------------------------git pull--------------...

  • Git相关

    关联到GitHub http://www.runoob.com/git/git-remote-repo.html

  • Git相关

    更新 fork 的仓库 https://github.com/lxconan/java/blob/master/s...

  • git相关

    常见命令 git help git config --global user.name "一纸砚白" git co...

  • git 相关

    2018年3月27日15:31:29 用eclipse 用习惯了,换着思维使用一下git,服务器用的是coding...

  • git相关

    https://www.jianshu.com/p/52694939213b

  • git相关

    本地创建新分支: git checkout -b 新分支名字 或者 git branch 新分支名字 git br...

  • git 相关

    1,git clone .. 克隆远程分支到本地。 2,git checkout branchName 在本地切换...

网友评论

      本文标题:Git 相关

      本文链接:https://www.haomeiwen.com/subject/vapdhqtx.html