• Stars
    star
    267
  • Rank 152,777 (Top 4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 14 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ghar: home as repositories

ghar (ghar: home as repositories)

ghar can help you manage your $HOME in git using a collection of git repos seperated by topic or privacy. For example if you work on a variety of machines and want to share your .emacs on github but not your .ssh then ghar is for you.

Brandon Philips [email protected]

INSTALL

ghar aims to be self contained to make it easy to use on machines where you may not have root. The clone of ghar you make below contains the ghar tool and will be the directory in which you clone all of your dotfile repos.

$ git clone https://github.com/philips/ghar.git
$ export PATH=$PATH:`pwd`/ghar/bin/ # You may wish to make this permanent

If you'd like bash tab completion, either move the included ghar-bash-completion.sh into /etc/bash_completion.d/ (requires root), or source the file directly:

$ . `pwd`/ghar/ghar-bash-completion.sh

Getting Started

Now, lets create a devel repo which will contain your .vimrc config file (or any other dotfile you choose). And then have ghar install it.

"ghar repos" are git repositories contained under the root ghar directory. For example if you cloned ghar in a directory called $HOME/tools in the INSTALL step above you will want to cd into $HOME/tools/ghar now to create your first ghar repo called devel:

$ cd ghar	# cd into the clone of ghar you made in the INSTALL step
$ ls
bin COPYING README
$ mkdir devel
$ cd devel
$ git init
$ mv ~/.vimrc .
$ git add .vimrc
$ git commit -m "vimrc: initial commit"
$ ghar install
  devel
    installed	/home/philips/.vimrc
$ ghar install --status
  devel
   ok	/home/philips/.vimrc

Adding External Repos

Adding an external repo is easy. ghar will do a git clone of the external repo into the proper directory and then install the symlinks with two commands:

$ ghar add git://github.com/robbyrussell/oh-my-zsh.git oh-my-zsh
$ ghar install
  oh-my-zsh
   installed	/home/philips/.oh-my-zsh

Upgrading a machine

To upgrade a machine to the latest version of all of the repos do the following:

$ ghar pull		# pull in all repos
$ ghar install	# install any new files

DONE! Enjoy the latest version of your configs.

Ignoring Files

ghar looks for a .gharignore file in each ghar repo it installs. This file lists, one per line, fnmatch-style patterns (e.g. README.*, *.txt, etc.) to ignore when creating symlinks.

Example .gharignore:

LICENSE
README.*
.gitmodules

Thanks

These two chaps helped me on the original bash implementation. However, our original plan of attack ended up being too unwieldy as it used the --git-dir directive to do the magic instead of symlinks.

  • Graham Forest
  • Gavin McQuillan

Contributors

  • Jeff Wong
  • Matthew Batema
  • Torne Wuff
  • Jacob Kaplan-Moss
  • aff0
  • Charles R. Hogg III

Notes about Windows support

Creating symlinks under Windows requires Administrator rights. This means that you will have to run ghar as Administrator / with elevated privileges (Windows Vista and higher).

More Repositories

1

grpc-gateway-example

Go
623
star
2

real-world-kubernetes

disaster recovery, security, and high-availability setups for kubernetes tutorials
Makefile
149
star
3

inkpalm-5-adb-english

Instructions to setup an Xioami Inkpalm 5 with English and other apps
HTML
105
star
4

supernote-obsidian-plugin

Supernote A5, A5X, A6X, A6X2 (Nomad) integration for Obsidian. Generate markdown, capture screen mirror, and more.
TypeScript
93
star
5

libuv-webserver

simple webserver in libuv
C
84
star
6

lualint

lua linter
Lua
84
star
7

libv4l

libv4l
C
46
star
8

ansible-kubernetes-daemonset

Hack to run ansible as a Kubernetes daemonset on Container Linux
Shell
36
star
9

2016-OSCON-containers-at-scale-with-Kubernetes

30
star
10

backplane-kubernetes-ingress

prototype Kubernetes Ingress Controller for Backplane.io
28
star
11

shortbread

OpenSSH CA Signing and Publishing Daemon
Go
25
star
12

text2pdf

Convert text files to pdf
C
19
star
13

kubernetes-day-2

These are notes to accompany my KubeCon EU 2017 talk. The slides are available as well.
19
star
14

hacks

random hacks
Go
16
star
15

fixiedocs

Single page docs
JavaScript
15
star
16

2016-LinuxCon-NA-CoreOS-A-Tutorial-on-Hyperscale-Infrastructure

Go
14
star
17

datadiff

fork of http://sourceforge.net/p/datadiff/code/
Python
11
star
18

tapkick

kegerator monitoring system (disclaimer: written while testing the system)
JavaScript
11
star
19

etcd-prometheus-operator-demo

10
star
20

ssh-agent-tool

Swiss army knife for SSH agents
Go
10
star
21

ghar-sh-archive

ghar (git: home as repository)
Shell
9
star
22

perfbook

Fork of Paul McKenney's Parallel Programming Book http://www2.rdrop.com/users/paulmck/
TeX
9
star
23

pg-go-queue

Go
9
star
24

supernote-typescript

TypeScript
9
star
25

eventloops

Experiments in using epoll and kqueue fds to integrate w/ uv event loop
C
7
star
26

node-cryptostream

node.js stream wrapper for crypto
JavaScript
7
star
27

golang-vendor-dockerfile-with-cache

Dockerfile
6
star
28

2016-LinuxCon-EU-CoreOS-A-Tutorial-on-Hyperscale-Infrastructure

Go
5
star
29

rackspace-html5-slides

fork of Google's io-2012-slides
JavaScript
5
star
30

attr

Commands for Manipulating Filesystem Extended Attributes
C
5
star
31

libswarm2

A minimalist toolkit to compose network services
Go
5
star
32

bandar

bandar - Patch monkey tools for mutt.
Shell
5
star
33

feusb

Code for the Fascinating Eletronics USB modules
Python
4
star
34

2016-LinuxCon-etcd-Next-Steps-with-the-Cornerstone-of-Distributed-Systems

Go
4
star
35

2016-OSCON-etcd

Go
4
star
36

oncall-issue-filer

File a GitHub issue based on an OpsGenie alert
Go
4
star
37

acl

Commands for Manipulating POSIX Access Control Lists
C
4
star
38

etc

Random dotfiles managed with ghar
Vim Script
4
star
39

node-kube

4
star
40

meink.vim

Vim Script
3
star
41

dav-file-converter

scripts to deal with amcrest security camera dav files on an ftp server
Shell
3
star
42

lpcwp

Linux Plumbers Conf Wordpress Theme
PHP
3
star
43

lpcstyle

Linux Plumbers Conf CSS Style
3
star
44

endpoint-hello

Example of using a Discovery API endpoint with golang
Go
3
star
45

lpc2009

Linux Plumbers Conf 2009 Website Archive
JavaScript
3
star
46

host-info

Go
3
star
47

namespaces-and-cgroups-linuxcon-2013

Slides and resources
3
star
48

cheekh

growl whether on a vm or host machine
Python
3
star
49

aerc

out of date mirror of https://git.sr.ht/~sircmpwn/aerc
Go
3
star
50

ociget

Shell
3
star
51

focaccia

a reboot manager using etcd
Go
2
star
52

lpcocw

lpc ocw theme
2
star
53

jistic

WIP: an api circuit breaker inspired by the Netflix circuitbreaker
JavaScript
2
star
54

lpc2011

Linux Plumbers Conf 2011 Website Archive
JavaScript
2
star
55

autocertsan

fork of golang.org/x/crypto/acme/autocert with SAN support
Go
2
star
56

lpc2010

Linux Plumbers Conf 2010 Website Archive
JavaScript
2
star
57

beaming-up-alien

Example code of lua alien and C
C
2
star
58

node-buildbot

under construction buildbot library for node
JavaScript
2
star
59

cloudfiles-crypto-proxy

an HTTP proxy between your client and Rackspace Cloudfiles that encrypts the object as it is uploaded with an AES key
JavaScript
2
star
60

monitoring-containerized-apps

2
star
61

labnotes

jekyll based tool to track notes
Shell
1
star
62

vim-ledger

pull contrib/vim out of jwiegley/ledger/ for ease of use with vundle
Vim Script
1
star
63

federation-hacks

Smarty
1
star
64

mailer

a simple Hook for sending emails
JavaScript
1
star
65

raxplanet

planet of fun stuff rackers do
1
star
66

tutorial3

tutorial example (delete me)
1
star
67

java-package

Import of http://packages.debian.org/lenny/java-package
Shell
1
star
68

totp-example

Stupid simple application to test out "Google Authenticator" style time based tokens.
Go
1
star
69

ssh.go

Example of using the go.crypto ssh library
Go
1
star
70

goven-bump

Wrapper around github.com/kr/goven to grab the mercurial or git commit
Shell
1
star
71

connect-crypto

connect middleware to encrypt http bodies
JavaScript
1
star
72

tensorflow-san-francisco-ballot-scanning

Shell
1
star
73

lpc2008

Linux Plumbers Conf 2008 Website Archive
1
star
74

anekvideo

anekvideo
C
1
star
75

godee

Simple pragmatic doc framework for human writers and readers
JavaScript
1
star
76

bugzilla-subcomponent-mockup

JavaScript
1
star
77

git-tutorial

a quick tutorial
JavaScript
1
star
78

crd-skaffold-issue

1
star
79

forge-mock

quick and dirty mock of trigger.io forge object
JavaScript
1
star
80

accha-nam

DNS stuff
JavaScript
1
star
81

luvit-systemd-journal

luvit bindig for the systemd journal
1
star
82

nya

Archive frontend code for the etcd dashboard
JavaScript
1
star