zoukankan      html  css  js  c++  java
  • 完整学习git一git设置

      1查看git版本

        git --version

            ➜ php- git:(master) git --version
        git version 1.8.3.1

      2告诉git当前用户的姓名和邮件地址

        git config --global user.name "your name"

        git config --global user.email "your email"

      3友好输出git命令输出时开启颜色显示

        git config --global color.ui true

      4初始化git版本控制工作区

        git init     #ls -aF  .git 目录就是git版本库

      5查找 .gi t文件所在目录 工作区根目录 相对于工作区根目录的相对目录 显示当前目录到工作区根的深度

        git rev-parse --git-dir

        git rev-parse --show-toplevel

        git rev-parse --show-prefix

        git rev-parse --show-cdup

      #git config命令各个参数的区别 --global --system

      实践  打开当前工作取中的.git/config 文件 (当前工作区git配置文件)    引用优先级 高

        git config -e

      实践 打开当前用户的.gitconfig文件 ~./.gitconfig (git全局配置文件)        中

        git config -e --global

      实践 打开/etc/gitconfig系统级配置文件进行编辑 (git system配置文件)                  低

        git config -e --system    

      git config 用与读取和更改ini配置文件

        git config <section>.<key> = value;

      #实践 工作区目录忽略权限

        git config core.filemode = false

      #查看远程仓库地址

        git config remote.origin.url

  • 相关阅读:
    强化学习
    nginx环境准备
    全面解读PHP-数据结构
    全面解读PHP-数据库缓存
    跨域问题的解决方法
    使用 apt-get 清理
    怎样用 Bash 编程:逻辑操作符和 shell 扩展
    怎样用 Bash 编程:语法和工具
    使用 split 命令分割 Linux 文件,使用 cat 合并文件
    通过tar包解压安装docker
  • 原文地址:https://www.cnblogs.com/a-flydog/p/5764034.html
Copyright © 2011-2022 走看看