GithubHelp home page GithubHelp logo

dotfiles's Introduction

dotfiles

pretty clear

Adapted from: https://www.ackama.com/what-we-think/the-best-way-to-store-your-dotfiles-a-bare-git-repository-explained/

You will basically be using a bare git repo like any other, but instead of git you will use the config command.

setup

Be in your home folder:

cd ~

Do not track yourself:

echo ".cfg" >> .gitignore

Clone repo:

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

On cloning, you should already have an alias in the .zshrc binding config to git, but for that .cfg repo only. At any rate, you will need an alias setup in an rc file for your shell, or just run this locally such that:

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

Make sure local repo ignores untracked files in $HOME (using that alias):

config config --local status.showUntrackedFiles no

Checkout needed branch dotfiles

config checkout <branch>

Rectify collision errors by removing any pre-existing files that are trying to be replaced.

Usage

Once the repo is cloned and you successfully checkout a branch, the configs for that branch are loaded and can be used. Whenever you want to add to the repo and track new configs, you can simply

config add <file/folder>

And commit as you please, being sure to use config in place of the usual git command.

dotfiles's People

Contributors

wtraceyv 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.