This repository was archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Notes
William Crandell edited this page Oct 18, 2015
·
1 revision
Obtained from @CrandellWS/Udacity-Nanodegree
-
Git Submodules
- Fork the orignal repository at https://github.com/adarsh0806/ud036_StarterCode
- Get the url to your clone fork (SSH or HTTPS your preference)
- Example of my fork:
- SSH -> git@github.com:CrandellWS/ud036_StarterCode.git
- HTTPS -> https://github.com/CrandellWS/ud036_StarterCode.git
- Add the repository as a submodule using the terminal
- Example with SSH
- git submodule add git@github.com:CrandellWS/ud036_StarterCode.git
- Important Notes
- When making changes to the submodule
-
cdinto the submodule directory Then- When changes are made to the actual submodule
-
git add -A-> add all changes to the submodule -
git commit-> commit all changes to the submodule -
git push-> push changes to the remote submodule's repository
-
- When changes are made to the submodule's repository
-
git pull-> pull changes from the remote submodule's repository -
git add -A-> add all changes to the submodule -
git commit-> commit all changes to the submodule
-
- When changes are made to the actual submodule
-
cd ..change directories to main project -
git add -A-> add all submodule changes to the project -
git commit-> commit all submodule changes to the project -
git push-> push all changes to the project's remote repository
-
- To use
from ud036_StarterCode import fresh_tomatoes- Must add
__init__.pyto the ud036_StarterCode directory-
__init__.pycan be an empty file - see -> https://docs.python.org/tutorial/modules.html#packages
-
- Must add
- When making changes to the submodule