{"id":17686625,"url":"https://github.com/vinhnx/dotfiles","last_synced_at":"2026-05-11T05:48:08.739Z","repository":{"id":148465577,"uuid":"502425756","full_name":"vinhnx/dotfiles","owner":"vinhnx","description":"vinhnx's dotfiles","archived":false,"fork":false,"pushed_at":"2022-09-03T13:08:56.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T23:57:20.141Z","etag":null,"topics":["bare","dotfiles","git"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinhnx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-11T18:25:22.000Z","updated_at":"2023-03-11T08:44:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ce45bcb-4b9d-4334-8a40-cdb3f0b1fa5b","html_url":"https://github.com/vinhnx/dotfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhnx%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhnx%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhnx%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinhnx%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinhnx","download_url":"https://codeload.github.com/vinhnx/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379385,"owners_count":20767696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bare","dotfiles","git"],"created_at":"2024-10-24T10:45:28.501Z","updated_at":"2026-05-11T05:48:08.702Z","avatar_url":"https://github.com/vinhnx.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotfiles\n\nMy dotfiles. \n\n---\n\n# Mics\n\n+ VSCode setup: https://github.com/vinhnx/vinhnx_vscode\n+ antfu's: https://github.com/antfu/dotfiles\n\n---\n\n### Install your dotfiles onto a new system (or migrate to this setup)\n\nIf you already store your configuration/dotfiles in a Git repository, on a new system you can migrate to this setup with the following steps:\n\nPrior to the installation make sure you have committed the alias to your `.bashrc` or `.zsh`. For example, in ~/.zshrc file, add:\n```bash\nalias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'\n```\n\nAnd that your source repository ignores the folder where you'll clone it, so that you don't create weird recursion problems:\n\n```bash\n$ echo \".cfg\" \u003e\u003e .gitignore\n```\n\nNow clone your dotfiles into a bare repository in a \"dot\" folder of your $HOME:\n\n```bash\n$ git clone --bare \u003cgit-repo-url\u003e $HOME/.cfg\n```\n\nDefine the alias in the current shell scope, add this line in ~/.zshrc:\n\n```bash\nalias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'\n```\n\nCheckout the actual content from the bare repository to your $HOME:\n\n```bash\n$ config checkout\n```\n\nThe step above might fail with a message like:\n\n```bash\nerror: The following untracked working tree files would be overwritten by checkout:\n    .bashrc\n    .gitignore\nPlease move or remove them before you can switch branches.\nAborting\n```\n\nThis is because your $HOME folder might already have some stock configuration files which would be overwritten by Git. The solution is simple: back up the files if you care about them, remove them if you don't care. I provide you with a possible rough shortcut to move all the offending files automatically to a backup folder:\n\n```bash\n$ mkdir -p .config-backup \u0026\u0026 \\\n$ config checkout 2\u003e\u00261 | egrep \"\\s+\\.\" | awk {'print $1'} | \\\n$ xargs -I{} mv {} .config-backup/{}\n```\n\nRe-run the check out if you had problems:\n\n```bash\n$ config checkout\n```\n\nSet the flag `showUntrackedFiles` to no on this specific (local) repository:\n\n```bash\n$ config config --local status.showUntrackedFiles no\n```\n\nYou're done, from now on you can now type config commands to add and update your dotfiles:\n\n```bash\n$ config status\n$ config add .vimrc\n$ config commit -m \"Add vimrc\"\n$ config add .zshrc\n$ config commit -m \"Add zshrc\"\n$ config push\n```\n\n---\n\n### Starting from scratch\n\nIf you haven't been tracking your configurations in a Git repository before, you can start using this technique easily with these lines:\n\n```bash\n$ git init --bare $HOME/.cfg\n$ alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'\n$ config config --local status.showUntrackedFiles no\n$ echo \"alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'\" \u003e\u003e $HOME/.zshrc \n```\n\n1. The first line creates a folder `~/.cfg` which is a **Git bare repository** that will track our files.\n2. Then we create an `alias config` which we will use **instead of the regular git** when we want to interact with our configuration repository.\n3. We set a flag `--local` to the repository - to hide files we are not explicitly tracking yet. This is so that when you type `config status` and other commands later, **files you are not interested in tracking will not show up as untracked.**\n4. Also you can add the `alias` definition by hand to your `.zshrc` or use the the fourth line provided for convenience.\n\n---\n\nManaged by `git init --bare` repository technique.\n\nRead more: https://www.atlassian.com/git/tutorials/dotfiles\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinhnx%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinhnx%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinhnx%2Fdotfiles/lists"}