随笔分类 -  Git

摘要:$GIT_DIR/info/attributes (which has the highest precedence) core.attributesFile: In addition to .gitattributes (per-directory) and .git/info/attribute 阅读全文
posted @ 2023-02-03 13:26 ascertain 阅读(17) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env bash # delete all branches without upstream while read branch; do upstream=$(git rev-parse --abbrev-ref $branch@{upstream} 2>/dev/null) 阅读全文
posted @ 2022-11-09 18:41 ascertain 阅读(22) 评论(0) 推荐(0) 编辑
摘要:--is-inside-work import subprocess, os repo_dir = os.path.expanduser('~/git/dchelper') command = ['git', 'rev-parse', '--is-inside-work-tree'] process 阅读全文
posted @ 2022-10-26 23:35 ascertain 阅读(47) 评论(0) 推荐(0) 编辑
摘要:Linux: source /etc/bash_completion.d/git souirce /usr/share/bash-completion/completions/git apt-get install git-core bash-completion source "$(pkg-con 阅读全文
posted @ 2022-10-02 23:19 ascertain 阅读(52) 评论(0) 推荐(0) 编辑
摘要:#!/bin/env bash git init touch init git add -- . git commit -am init echo a >> main_file git add --all git commit -am 'main a' echo b >> main_file git 阅读全文
posted @ 2022-02-10 15:00 ascertain 阅读(38) 评论(0) 推荐(0) 编辑
摘要:#!/bin/env bash for branch in $(git branch -a | grep '^\s*remotes/origin/' | grep -Ev '(:?HEAD|master)$'); do git branch --force --track "${branch##*/ 阅读全文
posted @ 2022-02-10 13:02 ascertain 阅读(128) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示