Last active
March 17, 2017 13:35
-
-
Save chaffeqa/63116efd40ea5eac2de4 to your computer and use it in GitHub Desktop.
Dot Files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.class | |
*.dll | |
*.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 | |
*.iso | |
*.jar | |
*.rar | |
*.tar | |
*.zip | |
# NOTE: dont include .gz since we may want to commit html files already gzipped | |
# *.gz | |
# Logs and databases # | |
###################### | |
*.log | |
*.sqlite | |
*.rdb | |
# OS generated files # | |
###################### | |
.DS_Store | |
ehthumbs.db | |
Thumbs.db | |
._* | |
.Spotlight-V100 | |
# TM Files # | |
############ | |
tmtags | |
tmtagsHistory | |
# Rubymine # | |
############ | |
.idea | |
# SublimeText # | |
############### | |
# workspace files are user-specific | |
*.sublime-workspace | |
# project files should be checked into the repository, unless a significant | |
# proportion of contributors will probably not be using SublimeText | |
# *.sublime-project | |
#sftp configuration file | |
sftp-config.json | |
# Rails # | |
######### | |
/config/memcached.yml | |
/config/database.yml | |
*.rbc | |
*.sassc | |
.sass-cache | |
capybara-*.html | |
.rspec | |
.ruby-gemset | |
.ruby-version | |
/.bundle | |
/log/* | |
/tmp/* | |
/db/*.sqlite3 | |
/public/system/* | |
/coverage/ | |
/spec/tmp/* | |
**.orig | |
rerun.txt | |
pickle-email-*.html | |
.rake_tasks~ | |
# Node # | |
######## | |
# Logs | |
logs | |
*.log | |
# Runtime data | |
pids | |
*.pid | |
*.seed | |
# Directory for instrumented libs generated by jscoverage/JSCover | |
lib-cov | |
# Coverage directory used by tools like istanbul | |
coverage | |
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | |
.grunt | |
# Compiled binary addons (http://nodejs.org/api/addons.html) | |
build/Release | |
# Dependency directory | |
# Commenting this out is preferred by some people, see | |
# https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git | |
node_modules | |
# Users Environment Variables | |
.lock-wscript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Preserving old ${HOME}/.gitconfig to: ${HOME}/.gitconfig.orig..." | |
cp $HOME/.gitconfig $HOME/.gitconfig.orig | |
user_name=`git config user.name` | |
while [[ -z "$user_name" ]] | |
do | |
read -e -p "Enter your Full Name ( used to display things like 'commit auther: Quinn Chaffee' ): " user_name | |
done | |
echo "Setting user.name to: $user_name..." | |
git config --global user.name $user_name | |
user_email=`git config user.email` | |
while [[ -z "$user_email" ]] | |
do | |
read -e -p "Enter your email ( used to display things like 'commit auther email: [email protected]' ): " user_email | |
done | |
echo "Setting user.email to: $user_email..." | |
git config --global user.email $user_email | |
# use ~/.gitignore_global as a default gitignore | |
echo "Using ${HOME}/.sti_gitignore_global as global git ignore file..." | |
curl https://gist.githubusercontent.com/chaffeqa/63116efd40ea5eac2de4/raw/ea63c6b253af1b3ec8ba2ad4ffcb21b374e97669/.sti_gitignore_global > $HOME/.sti_gitignore_global | |
git config --global core.excludesfile $HOME/.sti_gitignore_global | |
# echo "Preserving old .gitignore_global file at ~/.gitignore_global.orig..." | |
# cp $HOME/.gitignore_global $HOME/.gitignore_global.orig | |
# WHITESPACE LOGIC | |
# -------------------------- | |
# show whitespace warning on commits and checkouts | |
# options: (nowarn|warn|fix|error|error-all) | |
git config --global apply.whitespace warn | |
# default ENABLED by git: | |
# -- blank-at-eof: treats blank lines added at the end of file as an error | |
# -- blank-at-eol: treats trailing whitespaces at the end of the line as an error | |
# -- space-before-tab: treats a space character that appears immediately before a tab character in the initial indent part of the line as an error | |
# -- trailing-space: ( is a short-hand to cover both blank-at-eol and blank-at-eof. ) | |
# default DISABLED by git: | |
# -- indent-with-non-tab: treats a line that is indented with space characters instead of the equivalent tabs as an error | |
# -- tab-in-indent: treats a tab character in the initial indent part of the line as an error | |
# -- cr-at-eol: treats a carriage-return at the end of line as part of the line terminator, i.e. with it, trailing-space does not trigger if the character before such a carriage-return is not a whitespace | |
# -- tabwidth=<n>: tells how many character positions a tab occupies; this is relevant for indent-with-non-tab and when git fixes tab-in-indent errors. The default tab width is 8. Allowed values are 1 to 63. | |
# STI PREFERENCE: only the defaults! | |
git config --global core.whitespace blank-at-eof,blank-at-eol,space-before-tab | |
# STI PREFERENCE: This is the correct file ending setting for Mac / Linux OS's | |
# Setting this variable to "true" is almost the same as setting the text attribute to "auto" on all files except that text files are not guaranteed to be normalized: files that contain CRLF in the repository will not be touched. Use this setting if you want to have CRLF line endings in your working directory even though the repository does not have normalized line endings. This variable can be set to input, in which case no output conversion is performed. | |
# Read: http://git-scm.com/book/en/Customizing-Git-Git-Configuration#Formatting-and-Whitespace | |
git config --global core.autocrlf input | |
# BRANCH MANAGEMENT | |
# -------------------------- | |
# Defines the action git push should take if no refspec is given on the command line, no refspec is configured in the remote, and no refspec is implied by any of the options given on the command line. Possible values are: | |
# -- nothing - do not push anything. | |
# -- | |
# -- matching - push all branches having the same name in both ends. This is for those who prepare all the branches into a publishable shape and then push them out with a single command. It is not appropriate for pushing into a repository shared by multiple users, since locally stalled branches will attempt a non-fast forward push if other users updated the branch. | |
# -- This is currently the default, but Git 2.0 will change the default to simple. | |
# -- | |
# -- upstream - push the current branch to its upstream branch. With this, git push will update the same remote ref as the one which is merged by git pull, making push and pull symmetrical. See "branch.<name>.merge" for how to configure the upstream branch. | |
# -- | |
# -- simple - like upstream, but refuses to push if the upstream branch’s name is different from the local one. This is the safest option and is well-suited for beginners. It will become the default in Git 2.0. | |
# -- | |
# -- current - push the current branch to a branch of the same name. | |
# STI PREFERENCE: lets got with the Git 2.0 standard, simply because it enforces good merging ( should be a workflow of ONLY doing branch merges in a LOCAL --> LOCAL format, THEN pushing to remote ) | |
git config --global push.default simple | |
# Tells git branch and git checkout to set up new branches so that git-pull(1) will appropriately merge from the starting point branch. Note that even if this option is not set, this behavior can be chosen per-branch using the --track and --no-track options. The valid settings are: false — no automatic setup is done; true — automatic setup is done when the starting point is a remote-tracking branch; always — automatic setup is done when the starting point is either a local branch or remote-tracking branch. This option defaults to true. | |
# STI PREFERENCE: git's default | |
git config --global branch.autosetupmerge true | |
# When a new branch is created with git branch or git checkout that tracks another branch, this variable tells git to set up pull to rebase instead of merge (see "branch.<name>.rebase"). When never, rebase is never automatically set to true. When local, rebase is set to true for tracked branches of other local branches. When remote, rebase is set to true for tracked branches of remote-tracking branches. When always, rebase will be set to true for all tracking branches. See "branch.autosetupmerge" for details on how to set up a branch to track another branch. This option defaults to never. | |
# STI PREFERENCE: git's default | |
git config --global branch.autosetuprebase never | |
# MERGING | |
# -------------------------- | |
# STI PREFERENCE: this comes with OSX and is a very nice tool for beginers! | |
git config --global merge.tool opendiff | |
# STI PREFERENCE: include summaries of merged commits in commit merge messages (a MUST) | |
git config --global merge.log true | |
# same as above, for older git versions | |
git config --global merge.summary true | |
# STI PREFERENCE: dont keep .orig files after merge, we can always look at the unfuddle ( remote ) repo to see the original | |
# After performing a merge, the original file with conflict markers can be saved as a file with a .orig extension. If this variable is set to false then this file is not preserved. Defaults to true (i.e. keep the backup files). | |
git config --global mergetool.keepBackup false | |
# Use color when in terminal, but not when piping to file ( smart coloring ) | |
git config --global color.ui true | |
# NICE TO HAVES | |
# pretty logging | |
git config --global format.pretty "%C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset" | |
# minor nicities on file size errors ( especially for https ) | |
# The window memory size limit used by git-pack-objects(1) when no limit is given on the command line. The value can be suffixed with "k", "m", or "g". Defaults to 0, meaning no limit. | |
# git config --global pack.windowMemory 0 | |
# The maximum size of a pack. This setting only affects packing to a file when repacking, i.e. the git:// protocol is unaffected. It can be overridden by the --max-pack-size option of git-repack(1). The minimum size allowed is limited to 1 MiB. The default is unlimited. Common unit suffixes of k, m, or g are supported. | |
# git config --global pack.packSizeLimit 20m | |
git config --global http.postBuffer 524288000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Git setup: