aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/content/usage/blame.en-us.md38
-rw-r--r--docs/static/octicon-versions.svg1
2 files changed, 39 insertions, 0 deletions
diff --git a/docs/content/usage/blame.en-us.md b/docs/content/usage/blame.en-us.md
new file mode 100644
index 0000000000..7772bbc16d
--- /dev/null
+++ b/docs/content/usage/blame.en-us.md
@@ -0,0 +1,38 @@
+---
+date: "2023-08-14T00:00:00+00:00"
+title: "Blame File View"
+slug: "blame"
+sidebar_position: 13
+toc: false
+draft: false
+aliases:
+ - /en-us/blame
+menu:
+ sidebar:
+ parent: "usage"
+ name: "Blame"
+ sidebar_position: 13
+ identifier: "blame"
+---
+
+# Blame File View
+
+Gitea supports viewing the line-by-line revision history for a file also known as blame view.
+You can also use [`git blame`](https://git-scm.com/docs/git-blame) on the command line to view the revision history of lines within a file.
+
+1. Navigate to and open the file whose line history you want to view.
+1. Click the `Blame` button in the file header bar.
+1. The new view shows the line-by-line revision history for a file with author and commit information on the left side.
+1. To navigate to an older commit, click the ![versions](/octicon-versions.svg) icon.
+
+## Ignore commits in the blame view
+
+All revisions specified in the `.git-blame-ignore-revs` file are hidden from the blame view.
+This is especially useful to hide reformatting changes and keep the benefits of `git blame`.
+Lines that were changed or added by an ignored commit will be blamed on the previous commit that changed that line or nearby lines.
+The `.git-blame-ignore-revs` file must be located in the root directory of the repository.
+For more information like the file format, see [the `git blame --ignore-revs-file` documentation](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt).
+
+### Bypassing `.git-blame-ignore-revs` in the blame view
+
+If the blame view for a file shows a message about ignored revisions, you can see the normal blame view by appending the url parameter `?bypass-blame-ignore=true`.
diff --git a/docs/static/octicon-versions.svg b/docs/static/octicon-versions.svg
new file mode 100644
index 0000000000..aaf5f9cc2b
--- /dev/null
+++ b/docs/static/octicon-versions.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M7.75 14A1.75 1.75 0 0 1 6 12.25v-8.5C6 2.784 6.784 2 7.75 2h6.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 14Zm-.25-1.75c0 .138.112.25.25.25h6.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25h-6.5a.25.25 0 0 0-.25.25ZM4.9 3.508a.75.75 0 0 1-.274 1.025.249.249 0 0 0-.126.217v6.5c0 .09.048.173.126.217a.75.75 0 0 1-.752 1.298A1.75 1.75 0 0 1 3 11.25v-6.5c0-.649.353-1.214.874-1.516a.75.75 0 0 1 1.025.274ZM1.625 5.533h.001a.249.249 0 0 0-.126.217v4.5c0 .09.048.173.126.217a.75.75 0 0 1-.752 1.298A1.748 1.748 0 0 1 0 10.25v-4.5a1.748 1.748 0 0 1 .873-1.516.75.75 0 1 1 .752 1.299Z"></path></svg> \ No newline at end of file