{"id":27617634,"url":"https://github.com/plsr/dotfiles","last_synced_at":"2025-04-23T04:12:58.292Z","repository":{"id":86428512,"uuid":"87694652","full_name":"Plsr/dotfiles","owner":"Plsr","description":"My ~/.dotfiles 💻 🔧🗂","archived":false,"fork":false,"pushed_at":"2025-04-20T20:14:50.000Z","size":259,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T21:25:16.659Z","etag":null,"topics":[],"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/Plsr.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,"zenodo":null}},"created_at":"2017-04-09T08:42:24.000Z","updated_at":"2023-05-20T23:18:20.000Z","dependencies_parsed_at":"2024-04-07T16:15:21.721Z","dependency_job_id":null,"html_url":"https://github.com/Plsr/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/Plsr%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Plsr%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Plsr%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Plsr%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Plsr","download_url":"https://codeload.github.com/Plsr/dotfiles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366717,"owners_count":21418772,"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":[],"created_at":"2025-04-23T04:12:57.763Z","updated_at":"2025-04-23T04:12:58.280Z","avatar_url":"https://github.com/Plsr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotfiles\nMy dotfiles.  \nThere will probably be some more explanation here later.\n\n## The idea\nI got the idea for this setup from [Timos dotfiles](https://github.com/timomeh/dotfiles), who apparently got it from a [HackerNews thread](https://news.ycombinator.com/item?id=11071754).\n\nThe basic idea is to version the files in our home directory with git without having a `.git` folder in our home directory (which can be very annoying) and goes like this:  \n\n```sh\ngit init --bare $HOME/.dotfiles\nalias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'\ndotfiles config --local status.showUntrackedFiles no\n```\n\nIt took me a moment to wrap my head around this, so for future me I'll write down a short documentation of whats happening above.\n\n* `git init --bare $HOME/.dotfiles`  \nCreates a new `bare` git repository in our home folder called `.dotfiles`. A bare repository does not contain any working or checked out copies of files (further reading [here](http://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/)).  \n* `alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'`  \ncreates an alias for our newly created bare repository called `dotfiles`. We can use all git commands (like `add`, `commit`, `push`) with it, then being i.e. `dotfiles add .myfile`. Also, we're defining the `.git` directory (`~/.dotfiles`) and our working tree (our home folder) here.\n* `dotfiles config --local status.showUntrackedFiles no`  \nHides untracked files when using `dotfiles status`, since the majority of the files in our home directory will most certainly never be tracked in our dotfiles repository.\n* `echo \"alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'\" \u003e\u003e $HOME/.zshrc`  \nAdds the alias to our shell config, which is optional\n\nFurther reading can be found [here](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/).\n\n## Usage\nAll the dotfiles stay in our home directory. If we want to track a file, we simply check it in with our `dotfiles` alias like so:\n\n```sh\n~ $ dotfiles add .gitconfig\n```\n\nAnd then commit and push the same way.\n\n### Move to a new machine\n\nIt's just a Git Repo. But you can't clone into a directory with existing files, like macOS will write some files into the home directory.\n\n1. Clone into a directory with a seperate git directory and a temporary directory as working tree.\n   ```sh\n   git clone --separate-git-dir=$HOME/.dotfiles git@github.com:Plsr/dotfiles.git $HOME/dotfiles-tmp\n   ```\n\n2. Copy the working tree from the tmp directory into the home directory.\n   ```sh\n   cp -r ~/dotfiles-tmp/. ~\n   ```\n\n3. Delete the tmp dotfiles directory.\n   ```sh\n   rm -rf ~/dotfiles-tmp/\n   ```\n\n4. Add the dotfiles-git alias to the current shell.  \n   ```sh\n   alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'\n   ```\n\n5. Don't show untracked files.\n   ```sh\n   dotfiles config --local status.showUntrackedFiles no\n   ```\n\n### Getting started on a new machine\n\n1. Get basics working\n\t* sign in to iCloud\n\t* basic setup of Mouse \u0026 Keyboard\n2. Install Homebrew\n3. Intall git (will be re-installed via the Brewfile in step 6)\n4. Set up SSH key for Github\n5. Clone dotfiles\n6. `brew bundle`\n7. Change Alfred Shortcuts to CMD + Space\n8. Setup Dropbox and 1Password, then sign in to all the apps\n9. You're all set up\n\n## Vim Plugin Installation\nPlugins are installed via Vundle, so there is little to worry about. However, it\nmight happen that Vundle is not working out of the box. Reinstalling will solve\nthat issue. Afterwards, just run `:PluginInstall` in vim and you're cooking with\ngas.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplsr%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplsr%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplsr%2Fdotfiles/lists"}