当前位置: 首页 > news >正文

git自定义命令使用

1.Linux~/.bashrc内容

function custom_git {# 在 Windows 或 Unix 平台上设置 GIT_SSH_COMMANDexport GIT_SSH_COMMAND="ssh -i $custom_ssh"git "$@"
}# 设置 custom_ssh路径 
export custom_ssh="$HOME/.ssh/id_custom_sshkey"

2.Windows~/.bashrc内容

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; thentest -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"alias ls='ls --color=auto'#alias dir='dir --color=auto'#alias vdir='vdir --color=auto'alias grep='grep --color=auto'alias fgrep='fgrep --color=auto'alias egrep='egrep --color=auto'
fi# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.if [ -f ~/.bash_aliases ]; then. ~/.bash_aliases
fifunction custom_git {# 在 Windows 或 Unix 平台上设置 GIT_SSH_COMMANDexport GIT_SSH_COMMAND="ssh -i $custom_ssh"git "$@"
}# 设置 custom_ssh 路径
export custom_ssh="$HOME/.ssh/custom_sshKey"

3.使用

custom_git status

http://www.mrgr.cn/news/3914.html

相关文章:

  • input框的placeholder字体颜色如何修改?
  • 探索802.1X:构筑安全网络的认证之盾
  • 系统架构师计算题(1)——计算机系统基础知识(上)
  • 《Cloud Native Data Center Networking》(云原生数据中心网络设计)读书笔记 -- 06容器网络
  • Swift并发之钥:Grand Central Dispatch (GCD) 全攻略
  • 查看 CUDA 和 cuDNN 版本
  • RabbitMQ练习(Work Queues)
  • 基于微信小程序的书籍销售预测系统的设计与实现(论文+源码)_kaic
  • 【python】逐步回归(多元线性回归模型中的应用)
  • KVM虚拟化之命令行界面创建KVM虚拟机
  • Apache HTTP Server 的安装与配置
  • Android笔试面试题AI答之Kotlin(16)
  • Spring Boot的配置文件管理技巧
  • 拦截器实现 Mybatis Plus 打印含参数的 SQL 语句
  • 设计模式24-命令模式
  • django学习入门系列之第九点《案例 Flask+MySQL新增用户》
  • 【应急响应】-linux日志被删除?
  • 单例模式(饿汉式,懒汉式)
  • 计算机毕业设计选题推荐-豆瓣书籍可视化分析-Python爬虫-K-means算法
  • 【论文阅读】PRADA: Protecting Against DNN Model Stealing Attacks(2019)