- Env Vars:
touch $HOME/.local_aliases
- Aliases:
touch $HOME/.local_aliases
First, set user name and email for home repo:
$ dgit config user.name "Scott Werner"
$ dgit config user.email scott.werner.vt@gmail.com
A dgit status
shows nothing, since we’ve gitignored everything:
$ dgit status
On branch master
nothing to commit, working directory clean
We add things by overriding the ignore with -f
:
$ dgit add -f .profile
$ dgit commit -m "Added .profile"
[master f437f9f] Added .profile
1 file changed, 22 insertions(+)
create mode 100644 .profile
We can push our configuration files to a remote repository:
$ dgit remote add origin git@github.com:scottwernervt/dotfiles.git
$ dgit push origin master
* [new branch] master -> master
And easily deploy them to a new machine:
$ ssh someothermachine
$ git clone git@github.com:scottwernervt/dotfiles.git ./.dotfiles
$ alias dgit='git --git-dir=$HOME/.dotfiles/.git --work-tree=$HOME'
$ dgit reset --hard
HEAD is now at f437f9f Added .profile