This repository has been 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 -> [email protected]: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 [email protected]:CrandellWS/ud036_StarterCode.git
- Important Notes
- When making changes to the submodule
-
cd
into 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__.py
to the ud036_StarterCode directory-
__init__.py
can be an empty file - see -> https://docs.python.org/tutorial/modules.html#packages
-
- Must add
- When making changes to the submodule