From 750c751fd5b246bb107c4f99a1bd5ac0c1a50108 Mon Sep 17 00:00:00 2001 From: Andrej Gaevskij Date: Thu, 26 Apr 2012 12:40:04 +0400 Subject: [PATCH] First release --- README.md | 24 ++++++- gitconfig | 18 +++++ gitignore | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++ install.sh | 12 ++++ 4 files changed, 252 insertions(+), 3 deletions(-) create mode 100644 gitconfig create mode 100644 gitignore create mode 100644 install.sh diff --git a/README.md b/README.md index f913b1c..4f2d135 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,22 @@ -git-config -========== +# Базовая конфигурация git -Мои настройки git \ No newline at end of file +## Возможности + * Глобальный ignore файл + * Сокращения для основных команд + * pull → pl + * ph → ph + * checkout → co + * commit → ci + * status → st + * branch → br + * красивый log → hist + * SublimeText - текстовый редактор + * OpenDiff - для сравнения версий файлов + + + +## Перед запуском +Перед запуском скрипта необходимо задать имя и адрес почты в настройках git + + git config --global user.name "Andrej Gaevskij" + git config --global user.email "andrej.gaevskij@gmail.com" \ No newline at end of file diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..6955142 --- /dev/null +++ b/gitconfig @@ -0,0 +1,18 @@ +[alias] + pl = pull + ph = push + co = checkout + ci = commit + st = status + br = branch + hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short + +[color] + ui = auto + +[merge] + tool = opendiff + +[core] + editor = subl -w + ignorecase = false diff --git a/gitignore b/gitignore new file mode 100644 index 0000000..9cdf790 --- /dev/null +++ b/gitignore @@ -0,0 +1,201 @@ +################ +### WINDOWS +################ + +Thumbs.db +Desktop.ini +$RECYCLE.BIN/ + + + +################ +### OSX +################ + +.DS_Store +._* +.Spotlight-V100 +.Trashes + + + +################ +### MONODEVELOP +################ + +*.userprefs +*.usertasks +*.pidb +*.resources +test-results/ + + +################ +### SUBLIME +################ + +/*.sublime-project +*.sublime-workspace + + +################ +### ECLIPSE +################ + +*.pydevproject +.project +.metadata +bin/** +tmp/** +tmp/**/* +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################ +#### CSHARP +################ + +# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) +[Bb]in/ +[Oo]bj/ + +# mstest test results +TestResults + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +x64/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +*.vssscc +.builds + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper* + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Publish Web Output +*.Publish.xml + +# Others +[Bb]in +[Oo]bj +sql +TestResults +[Tt]est[Rr]esult* +*.Cache +ClientBin +[Ss]tyle[Cc]op.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + + + +# Compiled source # +################### +*.com +*.class +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..5ffa19b --- /dev/null +++ b/install.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +email=$(git config --global --get user.email) +name=$(git config --global --get user.name) + +cp -f gitconfig ~/.gitconfig + +git config --global user.email "$email" +git config --global user.name "$name" + +cp -f gitignore ~/.gitignore_global +git config --global core.excludesfile ~/.gitignore_global \ No newline at end of file