Giter VIP home page Giter VIP logo

dotfiles's Introduction

dotfiles

I am using git submodules and git bare repository to maintain my dotfiles.

Migrate to a new system

alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'

echo "dotfiles" >> .gitignore

git clone --bare https://github.com/svaderia/dotfiles $HOME/dotfiles

# Checkout config from bare repository to home
# if you get error, take backup of all the files
config checkout

config config --local status.showUntrackedFiles no

# When you are first initialising the submodules on a new system, run below command
config submodule update --init --recursive

# Reload the shell before doing below

# Don't forget to change the local_profile.zsh and local_alias.zsh to set the new paths
cp $ZSH_CUSTOM/setup.zsh.example $ZSH_CUSTOM/00-setup.zsh
touch $ZSH_CUSTOM/02-local_profile.zsh
touch $ZSH_CUSTOM/04-local_alias.zsh

# Optional
## Use following to update your git name and email
## TODO: This can be moved to a global variable in profile.zsh
git config --global user.name "svaderia"
git config --global user.email "<email>"
git config --global credential.helper store
git config --global core.editor vim

## Generate a new GPG key and set it to sign your commits with git
# https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key
# https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key

Updating all the packages

config submodule update --remote --merge

# create the undodir for the .vim
mkdir -p ~/.vim/undodir

Remove a package

config submodule deinit .vim/pack/bundle/start/vim-airline
config rm .vim/pack/bundle/start/vim-airline
rm -Rf .git/modules/.vim/pack/bundle/start/vim-airline
config commit

Add a new vim plugin (or anynew submodule for that matter)

config submodule add https://github.com/kana/vim-textobj-user ~/.vim/pack/bundle/start/vim-textobj-user
# Commit it
config add .gitsubmodule ~/.vim/pack/bundle/start/vim-textobj-user
config commit

Reference

TODO

  • I want to add a start up script which will run all the commands required to be run on a new machine. At least have them here.
  • Maybe have a test script which will make sure all the component of my dotfiles are running correctly.
  • Read more about this here https://dotfiles.github.io/tutorials/. Essentially decide if you want to switch to using the dotfiles this way.
  • I definitely need a way to have my global configs shared between systems, but still have local settings. For example, if I am on a remote machine I might want to set some aliases which wouldn't make sense elsewhere. The above link does go into handling it in multiple ways. Research and get better !
  • Add the project path to a profile variable, which can vary in each machine. For example my path aliases depend on my Mac config, so they are useless elsewhere. They can be useful only if I have profile variables.
  • Change to zsh fast syntax highlighting.
  • I want to also write about all the features I am using on a blog, again for me, so that I can come to it later when I will forget that I have some functionalities I don't use.
  • Add what I installed via brew, if it contains something I use for my terminal, I can reinstall it. 1
  • Explore Tmux
  • Explore SSH Config
  • I might want to switch to SSH-keys for Github

Footnotes

  1. See Brewfile and mackup on driesvints/dotfiles โ†ฉ

dotfiles's People

Contributors

svaderia avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.