随笔分类 - Git
摘要:$GIT_DIR/info/attributes (which has the highest precedence) core.attributesFile: In addition to .gitattributes (per-directory) and .git/info/attribute
阅读全文
摘要:#!/usr/bin/env bash # delete all branches without upstream while read branch; do upstream=$(git rev-parse --abbrev-ref $branch@{upstream} 2>/dev/null)
阅读全文
摘要:--is-inside-work import subprocess, os repo_dir = os.path.expanduser('~/git/dchelper') command = ['git', 'rev-parse', '--is-inside-work-tree'] process
阅读全文
摘要:Linux: source /etc/bash_completion.d/git souirce /usr/share/bash-completion/completions/git apt-get install git-core bash-completion source "$(pkg-con
阅读全文
摘要:#!/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
阅读全文
摘要:#!/bin/env bash for branch in $(git branch -a | grep '^\s*remotes/origin/' | grep -Ev '(:?HEAD|master)$'); do git branch --force --track "${branch##*/
阅读全文