Skip to content

Instantly share code, notes, and snippets.

@eomiso
Last active March 10, 2023 16:38
Show Gist options
  • Select an option

  • Save eomiso/9a9b3426713c6733e8ccbc3c79da9bf0 to your computer and use it in GitHub Desktop.

Select an option

Save eomiso/9a9b3426713c6733e8ccbc3c79da9bf0 to your computer and use it in GitHub Desktop.

Revisions

  1. eomiso revised this gist Mar 10, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init-config.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    git init --bare $HOME/.cfg
    alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
    config --local status.showUntrackedFiles no
    echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc
    echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zshrc

    function config {
    /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
  2. eomiso revised this gist Mar 10, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init-config.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    git init --bare $HOME/.cfg
    alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
    config config --local status.showUntrackedFiles no
    config --local status.showUntrackedFiles no
    echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc

    function config {
  3. eomiso revised this gist Mar 10, 2023. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions init-config.sh
    Original file line number Diff line number Diff line change
    @@ -10,9 +10,9 @@ mkdir -p .config-backup
    config checkout
    if [ $? = 0 ]; then
    echo "Checked out config.";
    else
    echo "Backing up pre-existing dot files.";
    config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
    else
    echo "Backing up pre-existing dot files.";
    config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
    fi;
    config checkout
    config config status.showUntrackedFiles no
  4. eomiso revised this gist Mar 10, 2023. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions init-config.sh
    Original file line number Diff line number Diff line change
    @@ -10,9 +10,9 @@ mkdir -p .config-backup
    config checkout
    if [ $? = 0 ]; then
    echo "Checked out config.";
    else
    echo "Backing up pre-existing dot files.";
    config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
    else
    echo "Backing up pre-existing dot files.";
    config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
    fi;
    config checkout
    config config status.showUntrackedFiles no
  5. eomiso created this gist Mar 10, 2023.
    18 changes: 18 additions & 0 deletions init-config.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    git init --bare $HOME/.cfg
    alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
    config config --local status.showUntrackedFiles no
    echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc

    function config {
    /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
    }
    mkdir -p .config-backup
    config checkout
    if [ $? = 0 ]; then
    echo "Checked out config.";
    else
    echo "Backing up pre-existing dot files.";
    config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
    fi;
    config checkout
    config config status.showUntrackedFiles no