%%bash
git config --global --get user.name git config --global --get user.email
In [ ]:
%%bash
git status
In [ ]:
%%bash
git log
In [ ]:
%%bash
git show
In [ ]:
%%writefile foo.md
Fetchez la vache
In [ ]:
%%bash
git add foo.md
In [ ]:
%%bash
git st
In [ ]:
%%bash
git diff foo.md
In [ ]:
%%bash
git diff git_intro.ipynb
In [ ]:
%%bash
git rm -f foo.md
In [ ]:
%%bash
git st
git clone https://github.com/<username>/git_intro_demo.git
In [ ]:
%%bash
git branch new_post
In [ ]:
%%bash
git checkout new_post
In [ ]:
%%writefile my_new_post.md
# Q: What is the meaning of life?
# A: 42
In [ ]:
%%bash
git st
In [ ]:
%%bash
git add my_new_post.md
In [ ]:
%%bash
git st
In [ ]:
%%bash
git ci -m "Adding my new post." my_new_post.md
In [ ]:
%%bash
git push
In [ ]:
%%bash
git push --set-upstream origin new_post
In [ ]:
%%bash
git remote --verbose
In [ ]:
%%bash
git remote add upstream https://github.com/ocefpaf/git_intro_demo.git
git remote --verbose
[alias]
pull = pull --ff-only
st = status -s
ci = commit
co = checkout
diff = diff --word-diff
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
ls = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
filelog = log -u
la = "!git config -l | grep alias | cut -c 7-"
grep = grep -Ii
Important things I did not cover: