Browse Source

Rename .gitignore file to not conflict with the system global .gitignore.

master
Fredrik Ekre 5 years ago
parent
commit
924e308c2c
  1. 19
      .README.md
  2. 2
      .bashrc.dotfiles
  3. 0
      .gitignore.dotfiles

19
.README.md

@ -6,12 +6,12 @@ Configuration files for syncing between machines. See https://www.atlassian.com/
1. Clone the repo: 1. Clone the repo:
``` ```
$ git clone --bare https://github.com/fredrikekre/.dotfiles.git $HOME/.dotfiles.git $ git clone --bare https://github.com/fredrikekre/.dotfiles.git "$HOME/.dotfiles.git"
``` ```
2. Define a temporary `dotfiles` alias: 2. Define a temporary `dotfiles` alias:
``` ```
$ alias dotfiles='git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME' $ alias dotfiles='git --git-dir="$HOME/.dotfiles.git/" --work-tree="$HOME"'
``` ```
3. Check out the files: 3. Check out the files:
@ -19,7 +19,15 @@ Configuration files for syncing between machines. See https://www.atlassian.com/
$ dotfiles checkout $ dotfiles checkout
``` ```
4. Add the following to the top of `.bashrc` 4. Configure the new local repo to hide untracked files and to use the local gitignore file
```
$ dotfiles config --local status.showUntrackedFiles no
$ dotfiles config --local core.excludesfile "$HOME/.gitignore.dotfiles"
```
5. Add the following to the top of `.bashrc`
``` ```
# Include cross-system common parts from .dotfiles.git repo # Include cross-system common parts from .dotfiles.git repo
if [ -f ~/.bashrc.dotfiles ]; then if [ -f ~/.bashrc.dotfiles ]; then
@ -27,9 +35,4 @@ Configuration files for syncing between machines. See https://www.atlassian.com/
fi fi
``` ```
5. Configure the new local repo to hide untracked files
```
$ dotfiles config --local status.showUntrackedFiles no
```
6. Reboot the shell 6. Reboot the shell

2
.bashrc.dotfiles

@ -12,7 +12,7 @@ case $- in
esac esac
# dotfiles alias # dotfiles alias
alias dotfiles='git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME/' alias dotfiles='git --git-dir="$HOME/.dotfiles.git/" --work-tree="$HOME/"'
# Common bash prompt # Common bash prompt
export PS1="[\[\e[32m\e[1m\]\u@\h\[\e[0m\]:\[\e[34m\e[1m\]\w\[\e[0m\]]\$ " export PS1="[\[\e[32m\e[1m\]\u@\h\[\e[0m\]:\[\e[34m\e[1m\]\w\[\e[0m\]]\$ "

0
.gitignore → .gitignore.dotfiles

Loading…
Cancel
Save