Unverified Commit 46bbdf64 authored by Simon Bowly's avatar Simon Bowly
Browse files


parent 92fbe4a3
Example solutions for Git Exercise
1. Assume remote repository created externally
Link to repo: https://github.com/coramthomas/bads-repo
2. Clone the project to your local disk
>>> git clone https://github.com/coramthomas/bads-repo bads-repo
>>> cd bads-repo/
3. Add a readme file with you name in it; do the first local commit; push this first commit to your public reo
>>> vi README.md
>>> git add README.md
>>> git commit -m "Created readme file"
>>> git push https://github.com/coramthomas/bads-repo
4. Create a notebook externally
5. Commit it to the local repo
>>> git add SinPlot.ipynb
>>> git commit -m "Created SinPlot notebook"
6. Make some changes to the file
>>> git add SinPlot.ipynb
>>> git commit -m "Added another plot"
7. Undo the changes
>>> git log --oneline
>>> git reset 9ea64d9
>>> git log --oneline
8. Create a new branch
>>> git branch patch
>>> git checkout patch
9. Make some changes to the file in the new branch
10. Commit the changes to the local repo
>>> git add SinPlot.ipynb
>>> git commit -m "Added some more plots"
11. Push both branches to your remote public repository
>>> git push https://github.com/coramthomas/bads-repo --all
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment