git同步

  • P9_428675
    了解作者
  • 29.3KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-31 19:41
    上传日期
自动更改(在目录中)对git repo的同步(也称为提交)。 您也可以运行其他命令! 去获取-u github.com/thejini3/git-sync 在$ HOME目录中创建一个名为.config.git-sync.json的文件 继续在后台运行-检查底部(LaunchAgents) 示例.config.git-sync.json文件 [ { " dir_path " : " /Users/nix/shell " , " commands " : [ { " command " : " git " , " args " : [ " add " , " . " ] }, {
git-sync-master.zip
  • git-sync-master
  • model.go
    395B
  • default.png
    28.4KB
  • Readme.md
    1.6KB
  • .config.git-sync.sample.json
    541B
  • main.go
    3.5KB
  • git-sync.service
    328B
  • .gitignore
    221B
  • git.sync.runner.plist
    531B
内容介绍
# Auto sync(aka commit) on changes (in a directory) to your git repo. You can run other commands too! 1. go get -u github.com/thejini3/git-sync 2. Create a file called `.config.git-sync.json` in your $HOME directory 3. Keep running in background - check bottom section (LaunchAgents) Example `.config.git-sync.json` file ```json [ { "dir_path": "/Users/nix/shell", "commands": [ { "command": "git", "args": ["add", "."] }, { "command": "git", "args": ["commit", "-m", "[auto] git-sync $CURRENT_TIME$"] }, { "command": "git", "args": ["push", "origin", "master"] } ], "delay": 5, "ignore_files": [ ".DS_Store", ".env" ] } ] ``` - `delay`, in seconds - `ignore_files`, files at which (on changes) command won't execute - special args `$CURRENT_TIME$` = `2006-01-02 15:04:05.999999999 -0700 MST`, `$RANDOM$` = `random 10 characters`, # Launch Agents For mac: put `git.sync.runner.plist` in `$HOME/Library/LaunchAgents` directory - `cp $GOPATH/src/github.com/thejini3/git-sync/git.sync.runner.plist ~/Library/LaunchAgents/` - `sudo chown root:wheel ~/Library/LaunchAgents/git.sync.runner.plist` For linux: put `git-sync.service` in `/lib/systemd/system` directory - `sudo systemctl start git-sync` - `sudo systemctl enable git-sync` (for auto start at boot) :: Make sure you made your path/directory changes to your launch agents ::
评论
    相关推荐