Skip to content

Commit

Permalink
minor edits for useful commands (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-i-l authored Oct 17, 2024
1 parent 30d4f0f commit 250d2c1
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ update_cycle/index
principles/index
feature_branch/index
versioning/index
useful_commands/index
exercise/index
```
12 changes: 12 additions & 0 deletions source/content/useful_commands/git_log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### <strong style="color:black">git log</strong>

<!-- pages-include -->

`git log` is an extremely powerful tool to explore the history of a repository with some particularly useful option:

- `--oneline` shows a condensed view with each commit on a single line.
- `--graph` visualizes the commit history as a branching graph.
- `--author="Author Name"` shows commits made by a specific author.
- `--since="2 weeks ago"` displays commits made since a specific date, useful for reviewing recent changes.
- `-p` displays the patch (diff) introduced in each commit, allowing you to see what changes were made.
- `--grep="keyword"` filters commits to show only those with messages containing a specific keyword.
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
# Useful Commands

This is a selection of commands that can particularly enhance your experience with <i class="fab fa-git"></i>:

{% if build == "slides" %}
<!-- BUILDING THE SLIDES -->
```{toctree}
:maxdepth: 2
:numbered:
./status
./git_log
./reflog
./rebase_i
./stash
./cherry_pick
```
{% else %}
<!-- BUILDING THE PAGES -->

::::{dropdown} git status &nbsp;[{octicon}`link-external;0.8em`](https://git-scm.com/docs/git-status)
```{include} ./status.md
:start-after: <!-- pages-include -->
```
::::
::::{dropdown} git log &nbsp;[{octicon}`link-external;0.8em`](https://git-scm.com/docs/git-log)
```{include} ./git_log.md
:start-after: <!-- pages-include -->
```
::::
::::{dropdown} git reflog &nbsp;[{octicon}`link-external;0.8em`](https://git-scm.com/docs/git-reflog)
```{include} ./reflog.md
:start-after: <!-- pages-include -->
Expand All @@ -39,4 +48,8 @@
:start-after: <!-- pages-include -->
```
::::
::::{dropdown} git status &nbsp;[{octicon}`link-external;0.8em`](https://git-scm.com/docs/git-status)
```{include} ./status.md
:start-after: <!-- pages-include -->
```
{% endif %}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ content/update_cycle/index
content/principles/index
content/feature_branch/index
content/versioning/index
content/useful_commands/index
content/exercise/index
```

0 comments on commit 250d2c1

Please sign in to comment.