This commit is contained in:
Andrei Astafev 2020-04-18 12:20:24 +03:00
parent 6f40948cef
commit f649a7a136
2 changed files with 216 additions and 90 deletions

157
config
View File

@ -1,143 +1,146 @@
[user] [user]
name = Andrey Astafyev name = Andrey Astafyev
email = dev@246060.ru email = dev@246060.ru
[core] [core]
editor = vim editor = vim
pager = less -R pager = less -R
whitespace=fix,trailing-space,cr-at-eol whitespace = fix,trailing-space,cr-at-eol
autocrlf = input autocrlf = input
safecrlf = true safecrlf = true
[merge] [merge]
tool = meld tool = meld
[diff] [diff]
tool = meld tool = meld
[difftool] [difftool]
prompt = false prompt = false
[difftool "meld"] [difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE" cmd = meld "$LOCAL" "$REMOTE"
[alias] [alias]
# Base commands # Base commands
ci = commit ci = commit
br = branch br = branch
co = checkout co = checkout
df = diff df = diff
lg = log -p lg = log -p
st = status --short st = status --short
cia = commit --allow-empty-message -a cia = commit --allow-empty-message -a
# Stash commands # Stash commands
sl = stash list sl = stash list
sa = stash apply sa = stash apply
ss = stash save ss = stash save
# Show all prfiles # 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 # 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 # Show untracked files
stu = status --untracked-files=no stu = status --untracked-files=no
# Show history # 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 # Show git commands
commands = help -a commands = help -a
# Get object type # Get object type
type = cat-file -t type = cat-file -t
# Get file info # Get file info
info = cat-file -p info = cat-file -p
# Show commit logs # Show commit logs
logs = !git shortlog --summary | sort --reverse --numeric-sort logs = !git shortlog --summary | sort --reverse --numeric-sort
# Show conflicts # 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 # Show unmerged files
unmerged = !git ls-files --unmerged | cut -f2 | sort -u unmerged = !git ls-files --unmerged | cut -f2 | sort -u
# Show aliases # Show aliases
aliases = !git config -l | grep alias | cut -c 7- aliases = !git config -l | grep alias | cut -c 7-
# Find files # 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 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 a file
ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >> .gitignore ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >> .gitignore
# Assume a file as unchanged # Assume a file as unchanged
assume = !git update-index --assume-unchanged assume = !git update-index --assume-unchanged
# Unassume a file # Unassume a file
unassume = !git update-index --no-assume-unchanged unassume = !git update-index --no-assume-unchanged
# Show assumed files # 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 # 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 # Delete multiple branches
#git branch -D `git for-each-ref --format="%(refname:short)" refs/heads/...` #git branch -D `git for-each-ref --format="%(refname:short)" refs/heads/...`
go = !gitgo go = !gitgo
pushall = !git remote | xargs -L1 git push --all pushall = !git remote | xargs -L1 git push --all
untrack = update-index --assume-unchanged untrack = update-index --assume-unchanged
track = update-index --no-assume-unchanged track = update-index --no-assume-unchanged
ls-untrack = !git ls-files -v | grep '^h' 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
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] [diff]
renames = copy renames = copy
[log] [log]
decorate = full decorate = full
[push] [push]
default = simple default = simple
[filter "lfs"] [filter "lfs"]
required = true required = true
clean = git-lfs clean -- %f clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f
process = git-lfs filter-process 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

149
ignore
View File

@ -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 # Compiled Object files
*.slo *.slo
*.lo *.lo
*.o *.o
*.pyc *.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries # Compiled Dynamic libraries
*.so *.so
*.so.*
*.dylib *.dylib
*.dll *.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries # Compiled Static libraries
*.lai *.lai
*.la *.la
*.a *.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 *.acn
*.acr *.acr
*.alg *.alg
@ -48,14 +182,3 @@
*.xdy *.xdy
*.tdo *.tdo
# Qt
*.pro.user
*.pro.user.*
moc_*.cpp
qrc_*.cpp
*-build-*
# gcc coverage testing tool files
*.gcno
*.gcda
*.gcov