aboutsummaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorIbrahim Mkusa <ibrahimmkusa@gmail.com>2024-07-28 23:05:45 -0400
committerIbrahim Mkusa <ibrahimmkusa@gmail.com>2024-07-28 23:05:45 -0400
commit8c4a6f932b129df4f9a63b7b2e2bcaea6f215866 (patch)
treed51cea169cae19b05025a0b26670a9a09505e8fe /git
Took snapshot of my main dotfiles
Diffstat (limited to 'git')
-rw-r--r--git/.gitconfig193
-rw-r--r--git/.gitignore521
2 files changed, 714 insertions, 0 deletions
diff --git a/git/.gitconfig b/git/.gitconfig
new file mode 100644
index 0000000..4f15e8b
--- /dev/null
+++ b/git/.gitconfig
@@ -0,0 +1,193 @@
+[core]
+ editor = vim
+[user]
+ name = Ibrahim Mkusa
+ email = "Your email here"
+[credential]
+ helper = cache --timeout=43200
+
+[alias]
+
+ # View abbreviated SHA, description, and history graph of the latest 20 commits
+ l = log --pretty=oneline -n 20 --graph --abbrev-commit
+
+ # View the current working tree status using the short format
+ s = status -s
+
+ # Show the diff between the latest commit and the current state
+ d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
+
+ # `git di $number` shows the diff between the state `$number` revisions ago and the current state
+ di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
+
+ # Pull in remote changes for the current repository and all its submodules
+ p = !"git pull; git submodule foreach git pull origin master"
+
+ # Clone a repository including all submodules
+ c = clone --recursive
+
+ # Commit all changes
+ ca = !git add -A && git commit -av
+
+ # Switch to a branch, creating it if necessary
+ go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
+
+ # Show verbose output about tags, branches or remotes
+ tags = tag -l
+ branches = branch -a
+ remotes = remote -v
+
+ # Amend the currently staged files to the latest commit
+ amend = commit --amend --reuse-message=HEAD
+
+ # Credit an author on the latest commit
+ credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
+
+ # Interactive rebase with the given number of latest commits
+ reb = "!r() { git rebase -i HEAD~$1; }; r"
+
+ # Remove the old tag with this name and tag the latest commit with it.
+ retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r"
+
+ # Find branches containing commit
+ fb = "!f() { git branch -a --contains $1; }; f"
+
+ # Find tags containing commit
+ ft = "!f() { git describe --always --contains $1; }; f"
+
+ # Find commits by source code
+ fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
+
+ # Find commits by commit message
+ fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
+
+ # Remove branches that have already been merged with master
+ # a.k.a. ‘delete merged’
+ dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
+
+ # List contributors with number of commits
+ contributors = shortlog --summary --numbered
+
+ # Merge GitHub pull request on top of the current branch or,
+ # if a branch name is specified, on top of the specified branch
+ mpr = "!f() { \
+ declare currentBranch=\"$(git symbolic-ref --short HEAD)\"; \
+ declare branch=\"${2:-$currentBranch}\"; \
+ if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \
+ git fetch origin refs/pull/$1/head:pr/$1 && \
+ git checkout -B $branch && \
+ git rebase $branch pr/$1 && \
+ git checkout -B $branch && \
+ git merge pr/$1 && \
+ git branch -D pr/$1 && \
+ git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \
+ fi \
+ }; f"
+
+[apply]
+
+ # Detect whitespace errors when applying a patch
+ whitespace = fix
+
+[core]
+
+ # Use custom `.gitignore` and `.gitattributes`
+ excludesfile = ~/.gitignore
+ attributesfile = ~/.gitattributes
+
+ # Treat spaces before tabs and all kinds of trailing whitespace as an error
+ # [default] trailing-space: looks for spaces at the end of a line
+ # [default] space-before-tab: looks for spaces before tabs at the beginning of a line
+ whitespace = space-before-tab,-indent-with-non-tab,trailing-space
+
+ # Make `git rebase` safer on macOS
+ # More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
+ trustctime = false
+
+ # Prevent showing files whose names contain non-ASCII symbols as unversioned.
+ # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html
+ precomposeunicode = false
+
+[color]
+
+ # Use colors in Git commands that are capable of colored output when
+ # outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
+ ui = auto
+
+[color "branch"]
+
+ current = yellow reverse
+ local = yellow
+ remote = green
+
+[color "diff"]
+
+ meta = yellow bold
+ frag = magenta bold # line info
+ old = red # deletions
+ new = green # additions
+
+[color "status"]
+
+ added = yellow
+ changed = green
+ untracked = cyan
+
+[commit]
+
+ # https://help.github.com/articles/signing-commits-using-gpg/
+ gpgsign = false
+
+[diff]
+
+ # Detect copies as well as renames
+ renames = copies
+
+[diff "bin"]
+
+ # Use `hexdump` to diff binary files
+ textconv = hexdump -v -C
+
+[help]
+
+ # Automatically correct and execute mistyped commands
+ autocorrect = 1
+
+[merge]
+
+ # Include summaries of merged commits in newly created merge commit messages
+ log = true
+
+[push]
+
+ # Use the Git 1.x.x default to avoid errors on machines with old Git
+ # installations. To use `simple` instead, add this to your `~/.extra` file:
+ # `git config --global push.default simple`. See http://git.io/mMah-w.
+ default = matching
+ # Make `git push` push relevant annotated tags when pushing branches out.
+ followTags = true
+
+# URL shorthands
+
+[url "git@github.com:"]
+
+ insteadOf = "gh:"
+ pushInsteadOf = "github:"
+ pushInsteadOf = "git://github.com/"
+
+[url "git://github.com/"]
+
+ insteadOf = "github:"
+
+[url "git@gist.github.com:"]
+
+ insteadOf = "gst:"
+ pushInsteadOf = "gist:"
+ pushInsteadOf = "git://gist.github.com/"
+
+[url "git://gist.github.com/"]
+
+ insteadOf = "gist:"
+
+[init]
+ defaultBranch = main
diff --git a/git/.gitignore b/git/.gitignore
new file mode 100644
index 0000000..6be086d
--- /dev/null
+++ b/git/.gitignore
@@ -0,0 +1,521 @@
+#
+# C
+# Prerequisites
+*.d
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+*.su
+
+# C++
+# Prerequisites
+*.d
+
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+*.smod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+# Java
+*.class
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+# Python
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# IPython Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# dotenv
+.env
+
+# virtualenv
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+
+# Rope project settings
+.ropeproject
+
+# Perl
+/blib/
+/.build/
+_build/
+cover_db/
+inc/
+Build
+!Build/
+Build.bat
+.last_cover_stats
+/Makefile
+/Makefile.old
+/MANIFEST.bak
+/META.yml
+/META.json
+/MYMETA.*
+nytprof.out
+/pm_to_blib
+*.o
+*.bs
+/_eumm/
+
+# Latex
+## Core latex/pdflatex auxiliary files:
+*.aux
+*.lof
+*.log
+*.lot
+*.fls
+*.out
+*.toc
+*.fmt
+*.fot
+*.cb
+*.cb2
+
+## Intermediate documents:
+*.dvi
+*-converted-to.*
+# these rules might exclude image files for figures etc.
+# *.ps
+# *.eps
+# *.pdf
+
+## Generated if empty string is given at "Please type another file name for output:"
+.pdf
+
+## Bibliography auxiliary files (bibtex/biblatex/biber):
+*.bbl
+*.bcf
+*.blg
+*-blx.aux
+*-blx.bib
+*.brf
+*.run.xml
+
+## Build tool auxiliary files:
+*.fdb_latexmk
+*.synctex
+*.synctex(busy)
+*.synctex.gz
+*.synctex.gz(busy)
+*.pdfsync
+
+## Auxiliary and intermediate files from other packages:
+# algorithms
+*.alg
+*.loa
+
+# achemso
+acs-*.bib
+
+# amsthm
+*.thm
+
+# beamer
+*.nav
+*.snm
+*.vrb
+
+# cprotect
+*.cpt
+
+# fixme
+*.lox
+
+#(r)(e)ledmac/(r)(e)ledpar
+*.end
+*.?end
+*.[1-9]
+*.[1-9][0-9]
+*.[1-9][0-9][0-9]
+*.[1-9]R
+*.[1-9][0-9]R
+*.[1-9][0-9][0-9]R
+*.eledsec[1-9]
+*.eledsec[1-9]R
+*.eledsec[1-9][0-9]
+*.eledsec[1-9][0-9]R
+*.eledsec[1-9][0-9][0-9]
+*.eledsec[1-9][0-9][0-9]R
+
+# glossaries
+*.acn
+*.acr
+*.glg
+*.glo
+*.gls
+*.glsdefs
+
+# gnuplottex
+*-gnuplottex-*
+
+# gregoriotex
+*.gaux
+*.gtex
+
+# hyperref
+*.brf
+
+# knitr
+*-concordance.tex
+# TODO Comment the next line if you want to keep your tikz graphics files
+*.tikz
+*-tikzDictionary
+
+# listings
+*.lol
+
+# makeidx
+*.idx
+*.ilg
+*.ind
+*.ist
+
+# minitoc
+*.maf
+*.mlf
+*.mlt
+*.mtc
+*.mtc[0-9]
+*.mtc[1-9][0-9]
+
+# minted
+_minted*
+*.pyg
+
+# morewrites
+*.mw
+
+# mylatexformat
+*.fmt
+
+# nomencl
+*.nlo
+
+# sagetex
+*.sagetex.sage
+*.sagetex.py
+*.sagetex.scmd
+
+# scrwfile
+*.wrt
+
+# sympy
+*.sout
+*.sympy
+sympy-plots-for-*.tex/
+
+# pdfcomment
+*.upa
+*.upb
+
+# pythontex
+*.pytxcode
+pythontex-files-*/
+
+# thmtools
+*.loe
+
+# TikZ & PGF
+*.dpth
+*.md5
+*.auxlock
+
+# todonotes
+*.tdo
+
+# easy-todo
+*.lod
+
+# xindy
+*.xdy
+
+# xypic precompiled matrices
+*.xyc
+
+# endfloat
+*.ttt
+*.fff
+
+# Latexian
+TSWLatexianTemp*
+
+## Editors:
+# WinEdt
+*.bak
+*.sav
+
+# Texpad
+.texpadtmp
+
+# Kile
+*.backup
+
+# KBibTeX
+*~[0-9]*
+*~
+
+# CMake
+CMakeCache.txt
+CMakeFiles
+CMakeScripts
+Makefile
+cmake_install.cmake
+install_manifest.txt
+CTestTestfile.cmake
+
+# Android
+# Built application files
+*.apk
+*.ap_
+
+# Files for the ART/Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+out/
+
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+# Android Studio Navigation editor temp files
+.navigation/
+
+# Android Studio captures folder
+captures/
+
+# Intellij
+*.iml
+.idea/workspace.xml
+.idea/libraries
+
+# Keystore files
+*.jks
+
+#
+# Packages
+*.7z
+*.jar
+*.rar
+*.zip
+*.gz
+*.bzip
+*.bz2
+*.xz
+*.lzma
+*.iso
+*.tar
+*.dmg
+*.pkg
+*.xpi
+*.gem
+*.egg
+*.deb
+*.rpm
+
+# LaTeX
+*.aux
+*.bbl
+*.blg
+*.dvi
+
+# Emacs
+\#*#
+.#*
+.dir-locals.el
+
+# Vim
+*.swp
+tags
+.netrwhist
+view
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+[._]*.s[a-w][a-z]
+[._]s[a-w][a-z]
+*.un~
+Session.vim
+.netrwhist
+*~
+
+.extra
+.gnupg
+!.gnupg/gpg.conf
+.i3/logfile
+.irssi/away.log
+.irssi/config*
+.irssi/nicknames_whitelist
+.irssi/otr
+.irssi/saved_colors
+.irssi/scripts/autorun/blocker.pl
+.irssi/startup
+.rainbow_oauth
+.nginx/conf.d/*
+
+# weechat
+*logs
+xfer
+weechat_fifo*
+*weechat.log
+*urlserver_list.txt
+.weechat/ecdsa.pem