mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-10 21:45:30 +00:00
Merge branch 'master' of https://github.com/danijoo/dotfiles
This commit is contained in:
@@ -2,8 +2,12 @@
|
||||
[user]
|
||||
# Please adapt and uncomment the following lines:
|
||||
name = Daniel Bauer
|
||||
email = bauer@cbs.tu-darmstadt.de
|
||||
[pack]
|
||||
threads = 8
|
||||
[merge]
|
||||
tool = kdiff3
|
||||
[core]
|
||||
pager = diff-so-fancy | less --tabs=4 -RFX
|
||||
[alias]
|
||||
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
|
||||
cm = !git add -A && git commit -m
|
||||
|
||||
1165
profiles/base/bin/diff-so-fancy
Executable file
1165
profiles/base/bin/diff-so-fancy
Executable file
File diff suppressed because it is too large
Load Diff
33
profiles/base/bin/github_http_to_ssh.sh
Executable file
33
profiles/base/bin/github_http_to_ssh.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#/bin/bash
|
||||
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
|
||||
# Modified from https://gist.github.com/m14t/3056747 to work on http/https and .git/nothing repos
|
||||
|
||||
|
||||
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https*://[^[:space:]]*).*#\1#p'`
|
||||
if [ -z "$REPO_URL" ]; then
|
||||
echo "-- ERROR: Could not identify Repo url."
|
||||
echo " It is possible this repo is already using SSH instead of HTTPS."
|
||||
exit
|
||||
fi
|
||||
|
||||
USER=`echo $REPO_URL | sed -Ene's#https*://github.com/([^/]*)/(.*)(\.git)?#\1#p'`
|
||||
if [ -z "$USER" ]; then
|
||||
echo "-- ERROR: Could not identify User."
|
||||
exit
|
||||
fi
|
||||
|
||||
REPO=`echo $REPO_URL | sed -Ene's#https*://github.com/([^/]*)/(.*)(\.git)?#\2#p'`
|
||||
if [ -z "$REPO" ]; then
|
||||
echo "-- ERROR: Could not identify Repo."
|
||||
exit
|
||||
fi
|
||||
|
||||
NEW_URL="git@github.com:$USER/$REPO.git"
|
||||
echo "Changing repo url from "
|
||||
echo " '$REPO_URL'"
|
||||
echo " to "
|
||||
echo " '$NEW_URL'"
|
||||
echo ""
|
||||
CHANGE_CMD="git remote set-url origin $NEW_URL"
|
||||
`$CHANGE_CMD`
|
||||
echo "Success"
|
||||
Reference in New Issue
Block a user