diff --git a/config b/config index 650fc04..d28b50a 100644 --- a/config +++ b/config @@ -1,143 +1,146 @@ [user] - name = Andrey Astafyev - email = dev@246060.ru + name = Andrey Astafyev + email = dev@246060.ru [core] - editor = vim - pager = less -R - whitespace=fix,trailing-space,cr-at-eol - autocrlf = input - safecrlf = true + editor = vim + pager = less -R + whitespace = fix,trailing-space,cr-at-eol + autocrlf = input + safecrlf = true [merge] - tool = meld + tool = meld [diff] - tool = meld + tool = meld [difftool] - prompt = false + prompt = false [difftool "meld"] - cmd = meld "$LOCAL" "$REMOTE" + cmd = meld "$LOCAL" "$REMOTE" [alias] # Base commands - ci = commit - br = branch - co = checkout - df = diff - lg = log -p - st = status --short - cia = commit --allow-empty-message -a + ci = commit + br = branch + co = checkout + df = diff + lg = log -p + st = status --short + cia = commit --allow-empty-message -a # Stash commands - sl = stash list - sa = stash apply - ss = stash save + sl = stash list + sa = stash apply + ss = stash save # Show all prfiles - ls = !git rev-parse --abbrev-ref HEAD | xargs git ls-tree -r --full-tree --full-name --name-only + ls = !git rev-parse --abbrev-ref HEAD | xargs git ls-tree -r --full-tree --full-name --name-only # Push into current remote branch - pc = !git rev-parse --abbrev-ref HEAD | xargs git push origin + pc = !git rev-parse --abbrev-ref HEAD | xargs git push origin # Show untracked files - stu = status --untracked-files=no + stu = status --untracked-files=no # Show history - history = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short + history = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short # Show git commands - commands = help -a + commands = help -a # Get object type - type = cat-file -t + type = cat-file -t # Get file info - info = cat-file -p + info = cat-file -p # Show commit logs - logs = !git shortlog --summary | sort --reverse --numeric-sort + logs = !git shortlog --summary | sort --reverse --numeric-sort # Show conflicts - conflicts = !git ls-files --unmerged | cut -f2 | sort -u | xargs grep -El '<<<<<<<|=======|>>>>>>>' + conflicts = !git ls-files --unmerged | cut -f2 | sort -u | xargs grep -El '<<<<<<<|=======|>>>>>>>' # Show unmerged files - unmerged = !git ls-files --unmerged | cut -f2 | sort -u + unmerged = !git ls-files --unmerged | cut -f2 | sort -u # Show aliases - aliases = !git config -l | grep alias | cut -c 7- + aliases = !git config -l | grep alias | cut -c 7- # Find files - find = !git ls-files -r HEAD | grep -ii + find = !git ls-files -r HEAD | grep -ii # Remove files which have been deleted - remove = !git ls-files -z --deleted | xargs -0 git rm + remove = !git ls-files -z --deleted | xargs -0 git rm # Ignore a file - ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >> .gitignore + ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >> .gitignore # Assume a file as unchanged - assume = !git update-index --assume-unchanged + assume = !git update-index --assume-unchanged # Unassume a file - unassume = !git update-index --no-assume-unchanged + unassume = !git update-index --no-assume-unchanged # Show assumed files - assumed = !git ls-files -v | grep ^h | cut -c 3- + assumed = !git ls-files -v | grep ^h | cut -c 3- # Pull from remote repository - fork = !git config --get remote.origin.url | xargs git pull + fork = !git config --get remote.origin.url | xargs git pull # Delete multiple branches #git branch -D `git for-each-ref --format="%(refname:short)" refs/heads/...` - go = !gitgo - pushall = !git remote | xargs -L1 git push --all + go = !gitgo + pushall = !git remote | xargs -L1 git push --all - untrack = update-index --assume-unchanged - track = update-index --no-assume-unchanged - ls-untrack = !git ls-files -v | grep '^h' - -# revert = checkout -- - - -[color] - diff = true - grep = true - status = true - ui = true - - [color "branch"] - current = yellow reverse - local = yellow - remote = green - - [color "diff"] - meta = normal - frag = magenta bold - old = red bold - new = blue bold - whitespace = red reverse - - [color "status"] - added = yellow - changed = green - untracked = cyan + untrack = update-index --assume-unchanged + track = update-index --no-assume-unchanged + ls-untrack = !git ls-files -v | grep '^h' + rm-submodule = " git rm --cached $1 && \ + rm -rf $1 && \ + rm -rf .git/modules/$1 && \ + git config -f .gitmodules --remove-section submodule.$1 && \ + git config -f .git/config --remove-section submodule.$1 " [diff] - renames = copy + renames = copy [log] - decorate = full + decorate = full [push] - default = simple + default = simple [filter "lfs"] - required = true - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + +[color] + diff = true + grep = true + status = true + ui = true + +[color "branch"] + current = yellow reverse + local = yellow + remote = green + +[color "diff"] + meta = normal + frag = magenta bold + old = red bold + new = blue bold + whitespace = red reverse + +[color "status"] + added = yellow + changed = green + untracked = cyan + diff --git a/ignore b/ignore index 1aca577..5be04e7 100644 --- a/ignore +++ b/ignore @@ -1,20 +1,154 @@ +### +### Общие настройки для C, C++, Fortran, Qt, CMake, Ninja, LaTeX и редакторов +### + +### +### Временные файлы текстовых редакторов +### +*.bak +*.gho +*.tmp + + +### +### LyX +### +*.lyx~ +*.lyx# + +### +### Vim +### +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + + +### +### C++ +### + +# Prerequisites +*.d + # Compiled Object files *.slo *.lo *.o -*.pyc +*.obj + +# Precompiled Headers +*.gch +*.pch # Compiled Dynamic libraries *.so +*.so.* *.dylib *.dll +# Fortran module files +*.mod +*.smod + # Compiled Static libraries *.lai *.la *.a +*.lib -# Latex +# Executables +*.exe +*.out +*.app + + +### +### CMake +### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + + +### +### Ninja +### +.ninja_deps +.ninja_log + + +### +### GCC coverage testing tool files +### +*.gcno +*.gcda +*.gcov + + +### +### Qt +### +object_script.*.Release +object_script.*.Debug +*_plugin_import.cpp +/.qmake.cache +/.qmake.stash +*.pro.user +*.pro.user.* +*.qbs.user +*.qbs.user.* +*.moc +moc_*.cpp +moc_*.h +qrc_*.cpp +ui_*.h +*.qmlc +*.jsc +Makefile* +*build-* +*.qm +*.prl + +# Qt unit tests +target_wrapper.* + +# QtCreator +*.autosave + +# QtCreator Qml +*.qmlproject.user +*.qmlproject.user.* + +# QtCreator local machine specific files for imported projects +*creator.user* + +*_qmlcache.qrc + + +### +### Latex +### *.acn *.acr *.alg @@ -48,14 +182,3 @@ *.xdy *.tdo -# Qt -*.pro.user -*.pro.user.* -moc_*.cpp -qrc_*.cpp -*-build-* - -# gcc coverage testing tool files -*.gcno -*.gcda -*.gcov