Steps to work with cmd + git repos + github + jupyter notebook at the same time: THEN; create or add new files, edit files; commit, AND then push to Github
Command prompt (cmd) to run git commands
Github
Jupyter notebook .. install anaconda navigator
- Download and Installl git on your machine : https://git-scm.com/downloads
- Setup Git Locally -
git config --global user.name "Samuel Kibe"
git config --global user.email "email@example.com"
- Clone your repository to your local machine
git clone https://github.com/username/repository.git, to your path/folder i.e git clone https://github.com/username/repository.git my_folder
- Now Manually Copy Your Files into the Repository on your machine.
- Stage the Files for Git - This stages all the files you copied into the repository folder.
git add file1.ipynb
git add file2.ipynb
- Commit the Changes
git commit -m "Added initial files to the repository"
- Push the Changes to GitHub - change main to your preferred branch
git push origin main
- Successful - Verify on GitHub
- Open Jupyter Notebook from anaconda prompt, or navigator whichever you prefer. ENSURE TO navigate to the cloned repository of interest:
- Work on the Files - open existing or create new etc
- Save Changes to GitHub
- through 'cmd' Commit and Push Changes to Github
git add .
git commit -m "Updated/added notebook files"
git push origin main
- Successful - Verify on GitHub