• git 设置别名 git alias


    git config --global alias.st status
    git config --global alias.ck checkout
    git config --global alias.br branch
    git config --global alias.cf config
    git config --global alias.fc fetch
    
    git config --replace-all --global alias.brv "branch --v"
    git config --replace-all --global alias.geturl "config --get remote.origin.url"
    

    参考https://git-scm.com/book/en/v2/Git-Basics-Git-Aliase

    有了这些就方便很多了。遇到可以自己再写。

    或者直接复制到.gitconfig

    [alias]
    	ch = checkou
    	st = status
    	staust = 'gitst'
    	cf = config
    	ck = checkout
    	ft = fetch
    	fh = fetch
    	br = branch
    	brv = branch --v
    	geturl = config --get remote.origin.url
    	bs = bisect
    	lg = log
    

    常见配置:

    [user]
    	name = caoxinyu
    	email = 1455971532@qq.com
    [merge]
       tool = studio64
    [mergetool "studio64"]
       cmd = studio64.exe merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
       trustExitCode = true
       keepbackup = false
    [diff]
       tool = studio64
    [difftool "studio64"]
       cmd = studio64.exe diff $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE")
       trustExitCode = true
       keepbackup = false
    [alias]
    	ch = checkou
    	st = status
    	staust = 'gitst'
    	cf = config
    	ck = checkout
    	ft = fetch
    	fh = fetch
    	br = branch
    	brv = branch --v
    	geturl = config --get remote.origin.url
    	bs = bisect
    	lg = log
    	cfg = config --global
    	cfga = config --global alias.
    	pull = pl
    	pl = pull
    	cm = commit -c HEAD
    	ps = push
    	lsr = ls-remote --heads
    	udc = reset HEAD~
    	ftg = fetch --tags
    	am = commit -amend
    	cmd = commit --amend
    	rsh = reset HEAD~
    	cmi = commit --interactive -c HEAD --reset-author
    	i = --interactive
    	rss = reset --soft
    	rmc = rm --cached
    	cp = cherry-pick
    	cpx = cherry-pick -x
    	bl = blame
    	gk = gitk
    	ltn = ls-tree -r HEAD~ --name-only
    	lt = ls-tree -r HEAD~ --name-only
    	ltng = ls-tree -r HEAD~ --name-only |grep
    	lgd = log -p --full-diff
    [i18n]
    	commitencoding = utf-8
    	logoutputencoding = utf-8
    [core]
    	quotepath = false
    [gui]
    	encoding = utf-8
    [i18n "commit"]
    	encoding = utf-8
    [http]
    [credential]
    	helper = manager
    
    
  • 相关阅读:
    MapReduce运行原理和过程
    为什么均方差(MSE)不适合分类问题?交叉熵(cross-entropy)不适合回归问题?
    207. 课程表
    131. 分割回文串
    152. 乘积最大子数组
    pandas内存优化函数
    395. 至少有K个重复字符的最长子串
    HTML入门
    递归与链表
    Spring--001
  • 原文地址:https://www.cnblogs.com/caoxinyu/p/10568541.html
Copyright © 2020-2023  润新知