Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.42 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # get the submodule initially
  2. git submodule add ssh://bla submodule_dir
  3. git submodule init
  4.  
  5. # time passes, submodule upstream is updated
  6. # and you now want to update
  7.  
  8. # change to the submodule directory
  9. cd submodule_dir
  10.  
  11. # checkout desired branch
  12. git checkout master
  13.  
  14. # update
  15. git pull
  16.  
  17. # get back to your project root
  18. cd ..
  19.  
  20. # now the submodules are in the state you want, so
  21. git commit -am "Pulled down update to submodule_dir"