diff --git a/gitcli-basics/README.md b/gitcli-basics/README.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bfd3854c1fbca31c299ea39af6a2f9d13e28df3a 100644 --- a/gitcli-basics/README.md +++ b/gitcli-basics/README.md @@ -0,0 +1,27 @@ +# Git Command Line Basics + +All Git commands start with the `git` "main" command followed by a keyword matching the Git operation to be performed. Running Git commands only works inside folders that belong to a (local) Git repository. +Trying to run Git commands outside a Git repository folder will generate an error message. + +[This index](https://git-scm.com/docs) lists all the available commands with links to extensive documentation. + +## Displaying information about a local repository + +The `git status` [command](https://git-scm.com/docs/git-status) displays information about the current status of the local repository: + - What is the current branch ? + - If it is related to a remote branch, have any modifications been made on either side ? + - What has happend to the files and folders of the local repository ? + +On a freshly cloned repository, the output of `git status` looks like: + +  + +The `git log` [command](https://git-scm.com/docs/git-log) details all the operations that have been performed on the current branch since it was created, crouped by commits. `git log` provides many many options to customize the output. + +On the freshly cloned example repository, the output of `git log` looks like: + +  + + + + diff --git a/gitcli-basics/media/log_initial.png b/gitcli-basics/media/log_initial.png new file mode 100644 index 0000000000000000000000000000000000000000..f249edee6a7933bb62626e78de28603c8925f31d Binary files /dev/null and b/gitcli-basics/media/log_initial.png differ diff --git a/gitcli-basics/media/status_initial.png b/gitcli-basics/media/status_initial.png new file mode 100644 index 0000000000000000000000000000000000000000..7b2a12cb1de1ebbac6116637cd7a0661643c1516 Binary files /dev/null and b/gitcli-basics/media/status_initial.png differ