Skip to content

Commit

Permalink
Merge pull request #152 from jessebot/fix-duplicate-gitconfig
Browse files Browse the repository at this point in the history
fix for #141 - multiple gitconfigs installed - change to one
  • Loading branch information
cloudymax authored Feb 19, 2023
2 parents 187d89f + e43d910 commit ae3926e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/onboardme/screenshots/help_text.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions onboardme/dot_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
# this is for rich text, to pretty print things
from rich import box
from rich.table import Table
from xdg import xdg_config_home
# custom libs
from .constants import HOME_DIR, PWD
from .console_logging import print_panel, print_msg
from .subproc import subproc


XDG_CONFIG_GIT_PATH = path.join(xdg_config_home(), 'git/config')


def setup_dot_files(OS='Linux', overwrite=False,
git_url="https://github.com/jessebot/dot_files.git",
branch="main") -> None:
Expand All @@ -27,8 +31,9 @@ def setup_dot_files(OS='Linux', overwrite=False,
opts = {'quiet': True, 'cwd': git_dir}

# global: use main as default branch, always push up new remote branch
cmds = ['git config --global init.defaultBranch main',
'git config --global push.autoSetupRemote true',
git_raw = "https://raw.githubusercontent.com/jessebot/dot_files/main"

cmds = [f'curl {git_raw}/.config/git/config -o {XDG_CONFIG_GIT_PATH}',
f'git --git-dir={git_dir} --work-tree={HOME_DIR} init',
'git config status.showUntrackedFiles no']
subproc(cmds, spinner=False, **opts)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "onboardme"
version = "0.18.0"
version = "0.18.1"
description = "Install dot files and packages, including a base mode with sensible defaults to run on most computers running Debian based distros or macOS."
authors = ["Jesse Hitch <[email protected]>"]
license = "AGPL-3.0-or-later"
Expand Down

0 comments on commit ae3926e

Please sign in to comment.