the single path
git-help
git help
In video
git help
- help summarygit help -a
— available subcommandsgit help -g
— concept guidesgit help git
- overview (full manual)git help <command>
- subcommand documentation
git-init
git init my-git-notes
In video
cd my-git-notes
ls
ls --all
ls .git
git help init
git-status
git status
In video
git status
rm -vfr .git
git status
git init
git-add
git add .git add some-file.txtgit add path/to/file.txtgit add '*.txt'git add -p
In video
git add help
git-reset
git reset .git reset some-file.txtgit reset path/to/file.txtgit reset '*.txt'git reset -p
In video
git reset help
git-commit
git commit -m "add git notes files"git commit # defaults to VISUAL or EDITOR (likely Vim)GIT_EDITOR="code --wait" git commit
git-log
git loggit log --pretty=onelinegit log --pretty=oneline --abbrev-commitgit log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
- graph can’t be set true: https://stackoverflow.com/a/25712489
git-diff
Add a change to one of the files.
echo "git add help" > git-add.txt
git diffgit diff --stagedgit diff headgit diff head~
https://www.golinuxcloud.com/git-head-caret-vs-tilde-at-sign-examples/
- add more to git to stage
git-remote
git-push
git-pull
git-fetch
git-clone
on configuring git
Let’s add got config for all of our options