Method: Autoshell::Git#update

Defined in:
lib/autoshell/git.rb

#updateString

Update the repo on disk

Returns:

  • (String)

    Output of git commands



40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/autoshell/git.rb', line 40

def update
  [
    git('checkout', '.'),
    git('clean', '-ffd'),
    git('fetch', 'origin'),
    git('checkout', branch),
    git('pull', '--recurse-submodules=yes'),
    git('checkout', commit_hash_for_checkout),
    git('submodule', 'update', '--init'),
    git('clean', '-ffd')
  ].join("\n")
end