Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template for .gitconfig file #157

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/setup-repository.bash
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ case "$choice" in
*) read -rp "Enter branch name: " branch ;;
esac

user_decision "Do you want to add a predefined '.gitignore' file to the package?"
if [[ " ${positive_answers[*]} " =~ " ${user_answer} " ]]; then
cp -n "${PACKAGE_TEMPLATES}/.gitignore" ".gitignore"
fi

git init
git checkout -b "$branch"
git add .
Expand Down
31 changes: 31 additions & 0 deletions templates/default_configurations/.gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#[includeIf "gitdir:~/workspace/"]
# path = ~/.gituser-work
#[includeIf "gitdir:~/Documents/"]
# path = ~/.gituser-private

[url "ssh://[email protected]/"]
insteadOf = https://github.com/
[url "ssh://[email protected]/"]
insteadOf = https://gitlab.com/

[core]
# editor = vim
excludesfile = ~/.gitignore
destogl marked this conversation as resolved.
Show resolved Hide resolved
[push]
default = matching
[help]
autocorrect = 1
[merge]
tool = kompare
[diff]
submodule = log
[credential]
helper = cache --timeout=600
[commit]
gpgsign = true
[alias]
cs = commit --signoff
clean-gone = ! "git fetch --all -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D"
s = status
[init]
defaultBranch = master
21 changes: 21 additions & 0 deletions templates/package/.gitignore
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das sollte symbolic link sein.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# temporary files
*~

# Visual Studio
.vscode/*

# Kate
*.kate-swp

# Vim temporary swap files.
*.swp

# Merge files.
*.orig
*.rej
Loading