Skip to content

DrDynamic/dotbot-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Dotbot git Plugin

Plugin for Dotbot, that adds git directive, which allows you to clone or pull git repositories.

Installation

  1. Simply add this repo as a submodule of your dotfiles repository:
git submodule add https://github.com/DrDynamic/dotbot-git.git
  1. Pass this folder (or directly git.py file) path with corresponding flag to your Dotbot script:
  • -p /path/to/file/git.py

or

  • --plugin-dir /pato/to/plugin/folder

Requirements

This plugin needs git 2.22 or later to be installed.

Also please note, that this plugin clones repositories direcly into the given path. No subfolders are created!

Properties

Name Description Required
url The URL to the remote repository Required
branch The branch to checkout after clone (or pull) optional
commit The commit to checkout after clone (or pull) optional
method Either clone, pull or clone-or-pull (see Supported methods) optional
description The description of the Repository (only for log output) optional
recursive If true, git clone and/or git pull will be run with --recurse-submodules optional

Supported methods

Method Description
clone Just clone the repository and checkout the configured branch / commit. Ignore that entry if that is alredy done.
pull Just pull the existing directory. Failes if the directory doesn't exist or isnt a git repository
clone-or-pull DEFAULT - Clones the repository if it doesnt exist or pulls changes if it does.

Supported task variants

...
- git: 
    '/local/path/to/clone/to':
       url: <url to repository> 
       branch: <name of the branch>
       commit: <commit hash>
       method: <clone|pull|clone-or-pull> 
       description: <name of the repository or something like that>
       recursive: <true|false>
    ...
...

Usage

Example config

...
- git:
    '~/.oh-my-zsh/custom/plugins/zsh-autosuggestions':
        url: 'https://github.com/zsh-users/zsh-autosuggestions'
        description: 'oh my zsh - autosuggestions'
    '~/.oh-my-zsh/custom/themes/powerlevel10k':
        url: 'https://github.com/romkatv/powerlevel10k.git'
        description: 'oh my zsh - powerlevel10k'
    '~/.zprezto':
        url: 'https://github.com/sorin-ionescu/prezto.git'
        description: "Install zprezto"
        recursive: true
    ...
...

Execution

"~/.dotfiles/bin/dotbot" -d "~/.dotfiles" -c "~/.dotfiles/packages.yaml" -p "~/.dotfiles/plugins/dotbot-git/git.py"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages