This is a personal project to get familiar with collaboration through github and introduce my dad to python. I'll be working with my dad (Hi Dad!) to set up a jupyter notebook that reads from a local csv where he tracks expenses and compare these expenses to a monthly budget.
# Navigate to local repository
cd into/cloned/fork-repo
# Add this repo as an upstream remote repository
git remote add upstream git://github.com/TifMoe/personal-finance-notebook.git
# Fetch down the changes
git fetch upstream
Now your local repository should be up-to-date with any changes made to my remote repo (yay!) but your remote forked repo still won't be up-to-date until you push your changes. In future, I believe you can just enter the following command from your local repository to fetch down changes made to this remote repo:
git pull upstream master
Some helpful commands to reference as you add, commit and push changes to your remote forked repo from a new branch
# Checkout status to see what files need to be added or committed
git status
# Create a new branch
git checkout -b BRANCHNAME
# Make sure you're on the branch you want to be on
git branch
# Add files to be committed
git add FILENAME
# Commit files that have been added
git commit -m 'SOME MESSAGE ABOUT THE CHANGES YOU'RE COMMITTING'
# Push local changes you've committed to your remote repository
git push origin BRANCHNAME
Then you can navigate to your github page on the web and see your new branch to make a pull request
Other resources for learning git and github:
- Github Cheatsheet
- CodeAcademy Interactive Github Tutorial
- Github Guides
- Syncing a forked local repo to the original remote repository from command line
Some resources for python and jupyter notebooks: