from IPython.display import Image # create a new git repository called gitdemo: !git init gitdemo !git clone https://github.com/qutip/qutip !git clone gitdemo gitdemo2 !git status %%file README A file with information about the gitdemo repository. !git status !git add README !git status !git commit -m "Added a README file" README !git add Lecture-7-Revision-Control-Software.ipynb !git commit -m "added notebook file" Lecture-7-Revision-Control-Software.ipynb !git status %%file README A file with information about the gitdemo repository. A new line. !git status !git commit -m "added one more line in README" README !git status %%file tmpfile A short-lived file. !git add tmpfile !git commit -m "adding file tmpfile" tmpfile !git rm tmpfile !git commit -m "remove file tmpfile" tmpfile !git log %%file README A file with information about the gitdemo repository. README files usually contains installation instructions, and information about how to get started using the software (for example). !git diff README Image(filename='images/github-diff.png') !git checkout -- README !git status !git log !git checkout 1f26ad648a791e266fbb951ef5c49b8d990e6461 !cat README !git checkout master !cat README !git status !git log !git tag -a demotag1 -m "Code used for this and that purpuse" !git tag -l !git show demotag1 !git branch expr1 !git branch !git checkout expr1 %%file README A file with information about the gitdemo repository. README files usually contains installation instructions, and information about how to get started using the software (for example). Experimental addition. !git commit -m "added a line in expr1 branch" README !git branch !git checkout master !git branch !git checkout master !git merge expr1 !git branch !git branch -d expr1 !git branch !cat README !git remote !git remote show origin !git pull origin !git status !git add Lecture-7-Revision-Control-Software.ipynb !git commit -m "added lecture notebook about RCS" Lecture-7-Revision-Control-Software.ipynb !git push Image(filename='images/github-project-page.png') Image(filename='images/gitk.png')