SHA1("The quick brown fox jumps over the lazy dog") => 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
$ git log --oneline --graph --decorate * b314b10 (HEAD -> crazy-experiment, master) init
git diff
enable us to compare between any two commits, branches, or tags in the repository. git diff 4e3dc9b 0cd75d4
$ git diff diff --git a/README.md b/README.md index 630b386..f5be3a7 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -## Readme +### Readme + +#### Topic 1
$ git branch * crazy-experiment master $ git diff HEAD diff --git a/README.md b/README.md index 630b386..f5be3a7 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -## Readme +### Readme + +#### Topic 1
# List all the branches $ git branch * master # Create new branch $ git branch# Delete a branch - prevents you from deleting the branch # if it has unmerged changes $ git branch -d # Force delete the specified branch $ git branch -D # Rename Branch $ git branch -m # List all remote branches $ git branch -a
$ git branch * master $ git branch crazy-expriment $ git branch crazy-expriment * master $ git checkout crazy-experiment Switched to branch 'crazy-experiment'
git branch crazy-experiment
A---B---C topic / D---E---F---G master
git merge topic
will replay the changes made on the topic branch since it diverged from master
(i.e., E) until its current commit (C) on top of master(G)A---B---C topic / \ D---E---F---G---H master
git filter-branch -f --index-filter \
'git rm --cached -f --ignore-unmatch PATH_OF_THE_LARGE_FILE' HEAD