{"id":18907731,"url":"https://github.com/waldronmatt/dotfiles","last_synced_at":"2025-09-04T18:31:41.584Z","repository":{"id":77697035,"uuid":"448332342","full_name":"waldronmatt/dotfiles","owner":"waldronmatt","description":"My personal dotfiles.","archived":false,"fork":false,"pushed_at":"2023-10-17T20:55:50.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T13:38:07.444Z","etag":null,"topics":["aliases","bash","configuration-management","dotfiles","git","powershell","scripts","shell"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waldronmatt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"ko_fi":"waldronmatt"}},"created_at":"2022-01-15T16:35:08.000Z","updated_at":"2024-02-29T03:35:08.000Z","dependencies_parsed_at":"2024-11-08T09:27:51.300Z","dependency_job_id":"fa67f8f4-340f-4d16-af35-d076adac0f9a","html_url":"https://github.com/waldronmatt/dotfiles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/waldronmatt/dotfiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronmatt%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronmatt%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronmatt%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronmatt%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waldronmatt","download_url":"https://codeload.github.com/waldronmatt/dotfiles/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronmatt%2Fdotfiles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273653770,"owners_count":25144529,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aliases","bash","configuration-management","dotfiles","git","powershell","scripts","shell"],"created_at":"2024-11-08T09:22:57.376Z","updated_at":"2025-09-04T18:31:40.043Z","avatar_url":"https://github.com/waldronmatt.png","language":"PowerShell","funding_links":["https://ko-fi.com/waldronmatt"],"categories":[],"sub_categories":[],"readme":"# dotfiles\n\nMy personal dot files.\n\n# Usage\n\nSee **[Create a New Repo](https://github.com/waldronmatt/dotfiles#create-a-new-repo)** to create your own dotfiles repository for the first time.\n\nSee **[Copy Dotfiles to Another Machine](https://github.com/waldronmatt/dotfiles#copy-dotfiles-to-another-machine)** to migrate your dotfiles to a new machine.\n\nSee **[Set Up Permanent Aliases](https://github.com/waldronmatt/dotfiles#set-up-permanent-aliases)** to set up custom short-cut commands.\n\nSee **[MISC](https://github.com/waldronmatt/dotfiles#misc)** for additional instructions.\n\n## Create a New Repo\n\nCreate your own dotfiles repo and sync with your machine.\n\n### Step 0\n\nCreate an empty repo on GitHub.\n\n### Step 1\n\nCreate a new bare Git repo to store the history for your dotfiles.\n\n```bash\ngit init --bare $HOME/dotfiles\n```\n\n### Step 2\n\nTell Git that it should use your home directory as the snapshot for this bare Git repo.\n\n#### Linux/MacOS\n\n**Note**: See **Set Up Permanent Aliases** to set this command permanently.\n\n```bash\nalias dotgit='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'\n```\n\n#### Windows (PowerShell)\n\nFirst, create a function.\n\n```powershell\nfunction dotgitsetup { git --git-dir=$HOME/dotfiles/ --work-tree=$HOME @args }\n```\n\nThen assign that function to an alias.\n\n**Note**: See **Set Up Permanent Aliases** to set this command permanently.\n\n```powershell\nSet-Alias -Name dotgit -Value dotgitsetup\n```\n\n### Step 3\n\nTell Git that this repo should not display all untracked files.\n\n```bash\ndotgit config status.showUntrackedFiles no\n```\n\n### Step 4\n\nAdd files and commit.\n\n**Note**: Whenever you want to add a new dotfile to your Git repo, use your aliased Git command.\n\n```bash\ndotgit status\n```\n\nAdd individual files (**recommended**).\n\n```bash\ndotgit add dotfile1 dotfile2\n```\n\n**Note**: It is **not** recommended to run `dotgit add .` as this will add all files under your home directory.\n\n```bash\ndotgit commit -m \"add git dotfiles\"\n```\n\n```bash\ndotgit remote add origin https://github.com/waldronmatt/dotfiles.git\n```\n\n```bash\ndotgit push --set-upstream origin main\n```\n\n## Copy Dotfiles to Another Machine\n\nThis section provides instructions for migrating your dotfiles repo on Github to your local machine.\n\n### Step 1\n\nClone your repo onto the new machine as a non-bare repository.\n\n```bash\ngit clone --separate-git-dir=$HOME/dotfiles https://github.com/waldronmatt/dotfiles.git dotfiles-tmp\n```\n\n### Step 2\n\nCopy the snapshot from your temporary directory to the correct locations on your new machine.\n\n#### Linux/MacOS\n```bash\nrsync --recursive --verbose --exclude '.git' dotfiles-tmp/ $HOME/\n```\n\n#### Windows (PowerShell)\n```powershell\nCopy-Item -Path \"$HOME\\dotfiles-tmp\\*\" -Destination \"$HOME/\" -Recurse -Exclude \".git\"\n```\n\n### Step 3\n\nRemove the temporary directory.\n\n#### Linux/MacOS\n```bash\nrm -rf dotfiles-tmp\n```\n\n#### Windows (PowerShell)\n```powershell\nRemove-Item -Force -Recurse -Path \"$HOME\\dotfiles-tmp\\\"\n```\n\n### Step 4\n\nRepeat steps 2 - 4 above in the section **Create a New Repo**.\n\n## Set Up Permanent Aliases\n\nInstructions for setting up permanaent aliases to more easily maintain dotfiles.\n\n#### Linux/MacOS\n\nCreate a new file to store your alias configurations.\n\n```bash\ntouch ~/.bash_aliases\n```\n\nInside `.bash_aliases`, save your aliases:\n\n```bash\nalias dotgit='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'\n```\n\nHave your linux system's `~/.bashrc` file load your custom `~/.bash_aliases` file.\n\n```bash\nif [ -e $HOME/.bash_aliases ]; then\n  source $HOME/.bash_aliases\nfi\n```\n\nNow you can run your `dotgit` from anywhere. Aliases will remain even with terminal/machine restarts.\n\n#### Windows (PowerShell)\n\nEnter the following command to allow scripts to run and set the execution scope to the current user.\n\n**Note**: Read more about the security policy [here](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2#remotesigned).\n\n```powershell\nset-ExecutionPolicy RemoteSigned -Scope CurrentUser\n```\n\nCreate a new file called `profile.ps1` and save the file in the following directory.\n\n```powershell\n$Home\\My Documents\\WindowsPowerShell\\profile.ps1\n```\n\nInside `profile.ps1`, save your aliases.\n\nFirst, create a function\n```powershell\nfunction dotgitsetup { git --git-dir=$HOME/dotfiles/ --work-tree=$HOME @args }\n```\n\nThen assign that function to an alias.\n\n```powershell\nSet-Alias -Name dotgit -Value dotgitsetup\n```\n\nSave `profile.ps1`, and restart your PowerShell terminal.\n\nNow you can run your `dotgit` from anywhere. Aliases will remain even with terminal/machine restarts.\n\n## MISC\n\n### Set up the global gitignore file\n\n#### Linux/MacOS\n\n```bash\ngit config --global core.excludesfile ~/.gitignore_global\n```\n\n#### Windows (PowerShell)\n\n```powershell\ngit config --global core.excludesfile \"$Env:USERPROFILE\\.gitignore_global\"\n```\n\n## References\n\n[https://stegosaurusdormant.com/bare-git-repo/](https://stegosaurusdormant.com/bare-git-repo/)\n\n[https://dev.to/bowmanjd/store-home-directory-config-files-dotfiles-in-git-using-bash-zsh-or-powershell-the-bare-repo-approach-35l3](https://dev.to/bowmanjd/store-home-directory-config-files-dotfiles-in-git-using-bash-zsh-or-powershell-the-bare-repo-approach-35l3)\n\n[https://www.atlassian.com/git/tutorials/dotfiles](https://www.atlassian.com/git/tutorials/dotfiles)\n\n[https://www.ackama.com/blog/posts/the-best-way-to-store-your-dotfiles-a-bare-git-repository-explained](https://www.ackama.com/blog/posts/the-best-way-to-store-your-dotfiles-a-bare-git-repository-explained)\n\n[https://opensource.com/article/19/7/bash-aliases](https://opensource.com/article/19/7/bash-aliases)\n\n[https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)\n\n[https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldronmatt%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaldronmatt%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldronmatt%2Fdotfiles/lists"}