Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. ### Hard Reset Local branch to the origin/remote.
  2. > This basically discard all changes, commits, etc. which are not pushed to remote yet, and pull the latest version from the remote.
  3.  
  4. ```bash
  5. git fetch origin master
  6. git reset --hard FETCH_HEAD
  7. git clean -df
  8. ```
  9.  
  10. ### Managing sub-module repos.
  11. > This will add external repositories as submodules into the current repository.
  12.  
  13. ```bash
  14. git submodule add <repo-url> <sub-module-name>
  15.  
  16. ```
  17.  
  18. > This is how you clone a repository that contains submodules.
  19. ```bash
  20. git clone -recurse-submodules -j8 <main-repo-url>
  21. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement