git 常用配置项

git 常用配置

全局提交用户名与邮箱

git config --global user.name “Yuchen Deng”

git config --global user.email 邮箱名@gmail.com

中文编码支持

echo “export LESSCHARSET=utf-8” > $HOME/.profile

git config --global gui.encoding utf-8

git config --global i18n.commitencoding utf-8

git config --global i18n.logoutputencoding gbk

全局编辑器,提交时将COMMIT_EDITMSG编码转换成UTF-8可避免乱码

git config --global core.editor notepad2

差异工具配置

git config --global diff.external git-diff-wrapper.sh

git config --global diff.tool tortoise

git config --global difftool.tortoise.cmd ‘TortoiseMerge -base:"$LOCAL" -theirs:"$REMOTE"’

git config --global difftool.prompt false

合并工具配置

git config --global merge.tool tortoise

git config --global mergetool.tortoise.cmd ‘TortoiseMerge -base:"$BASE" -theirs:"$REMOTE" -mine:"$LOCAL" -merged:"$MERGED"’

git config --global mergetool.prompt false

别名设置

git config --global alias.dt difftool

git config --global alias.mt mergetool

备注:git config 的时候指定–global 就是全局设定,如果没有指定就不是全局的。

时间: 2024-08-11 07:35:15

git 常用配置项的相关文章

Nuxt.js学习(二) --- Nuxt目录结构详解、Nuxt常用配置项、Nuxt路由配置和参数传递

[TOC] 1.Nuxt目录结构详解 Nuxt项目文件目录结构 |-- .nuxt // Nuxt自动生成,临时的用于编辑的文件,build |-- assets // 用于组织未编译的静态资源入LESS.SASS 或 JavaScript |-- components // 用于自己编写的Vue组件,比如滚动组件,日历组件,分页组件 |-- layouts // 布局目录,用于组织应用的布局组件,不可更改. |-- middleware // 用于存放中间件 |-- pages // 用于存放

【前端小小白的学习之路】Git常用命令整理

Git 常用命令清单. 几个专用名词的译名如下: Workspace:工作区 Index / Stage:暂存区 Repository:仓库区(或本地仓库) Remote:远程仓库 一.新建代码库 # 在当前目录新建一个Git代码库 $ git init # 新建一个目录,将其初始化为Git代码库 $ git init [project-name] # 下载一个项目和它的整个代码历史 $ git clone [url] 二.配置 Git的设置文件为.gitconfig,它可以在用户主目录下(全局

git常用命令2

git常用命令2 添加远程仓库(以github为例) 登录官方网站https://github.com,没有的话去注册一个账号吧. 然后新建一个仓库 在Repository name填入learngit,其他保持默认设置,点击"Create repository"按钮,就成功地创建了一个新的Git仓库: 目前,在GitHub上的这个learngit仓库还是空的,GitHub告诉我们,可以从这个仓库克隆出新的仓库,也可以把一个已有的本地仓库与之关联,然后,把本地仓库的内容推送到GitHu

iOS开发——开发技巧&Git常用命令

Git常用命令 初始化git init        加—bare实现远程仓库 配置git config user.name iCocos 配置全局git config —global user.name iCocosgit config —global user.email [email protected] 状态git status 添加到帮派git add iCocos.m 提交git commit iCocos.m -m “注释” Log纪录git loggit log + 文件名git

webpack基础+webpack配置文件常用配置项介绍+webpack-dev-server

一.webpack基础 1.在项目中生成package.json:在项目根目录中输入npm init,根据提示输入相应信息.(也可以不生成package.json文件,但是package.json是很有用的,所有建议生成) 2.安装webpaack a.在全局中安装webpack:npm install webpack -g b.将webpack安装到项目并将webpack写入package.json的devDependencies中:进入项目根目录,然后在命令行中输入npm install w

git常用命令符

全局配置 $ git config --global user.name "姓名" 告诉git你是谁 $ git config --global user.email "[email protected]" 告诉git怎么联系你 如果注册了 github 账号,邮箱最好和 github 账号统一 $ git config -l 查看配置信息初始化代码仓库 $ git init 初始化代码库 $ git add . 将所有变化添加到暂存区 $ git commit -

hadoop 常用配置项【转】

hadoop 常用配置项[转] core-site.xml  name value  Description   fs.default.name hdfs://hadoopmaster:9000 定义HadoopMaster的URI和端口  fs.checkpoint.dir /opt/data/hadoop1/hdfs/namesecondary1 定义hadoop的name备份的路径,官方文档说是读取这个,写入dfs.name.dir  fs.checkpoint.period 1800 定

(小组)Git 常用命令整理

Git 常用命令整理 取得Git仓库 初始化一个版本仓库 git init Clone远程版本库 git clone [email protected]:wordpress.git 添加远程版本库origin,语法为 git remote add [shortname] [url] git remote add origin [email protected]:wordpress.git 查看远程仓库 git remote -v 提交你的修改 添加当前修改的文件到暂存区 git add . 如果

github创建远程仓库和git常用命令

git创建远程仓库 首先到github页面上创建仓库(repository)如下: 然后初始化文件夹为仓库,并提交到远程仓库,如下: [[email protected] aa]# git init Initialized empty Git repository in /data/mydata/aa/.git/ [[email protected] aa]# git add . [[email protected] aa]# git commit -m "first commit"