Skip to content

Commit

Permalink
source-control: new magit screenshots & gitlinker plugin use
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Oct 15, 2024
1 parent 939f377 commit 4870362
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- reference: link to intro to lua from codecademy
- reference: example disable plugin config
- mkdocs: error page add link to Practicalli Contributing page
- source-control: new magit screenshots & gitlinker plugin use

### Changed
- ci: spell lychee & repository trufflehog linters warn only (false positives)
Expand Down
19 changes: 15 additions & 4 deletions docs/source-control/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ There are several ways to interact with Git version control, although Practicall
- [lazygit](lazygit.md) terminal UI (requires lazygit cli tool)
- [Neogit](neogit.md) rich git client (similar to Emacs Magit), with Diffview integration
- [Octo](octo.md) for GitHub Issue and Pull Requests
- [Open in GitHub](open-in-github.md)
- [Open files & lines in Git website](#open-in-git-website)
- Shell out to the command line, `:!`
- Git commands in Neovim terminal buffer



## Common Git actions

### Initialise local repository"
Expand All @@ -31,15 +32,25 @@ The current hunk or the whole buffer can be staged from the buffer using Git Sig

### Git Status

`SPC g g` opens lazygit status, for minimal UI
++spc++ ++"g"++ ++"g"++ opens lazygit terminal UI client

![AstroNvim Git - Lazygit status](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/astronvim/astronvim-git-lazygit-status-example-light.png?raw=true#only-light){loading=lazy}
![AstroNvim Git - Lazygit status](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/astronvim/astronvim-git-lazygit-status-example-dark.png?raw=true#only-dark){loading=lazy}

++spc++ ++"g"++ ++"s"++ ++spc++ ++"g"++ ++"n"++ ++"t" opens neogit in a new tab for Magit style experience

++spc++ ++"g"++ ++"n"++ ++"t" opens neogit in a new tab for Magit style experience

![Neovim Neogit plugin - git status buffer](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/screenshots/neovim-neogit-status-light.png?raw=true#only-light)
![Neovim Neogit plugin - git status buffer](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/screenshots/neovim-neogit-status-dark.png?raw=true#only-dark)


## Open in Git website

++spc++ ++"g"++ ++"z"++ to open a git controlled file or visually selected lines in the Git sharing website (e.g. GitHub, GitLab)

++spc++ ++"g"++ ++"y"++ to yank the URL for the current file or visually selected lines.

![Neovim Neogit plugin - git status buffer](https://raw.githubusercontent.com/practicalli/graphic-design/live/editors/neovim/screenshots/neovim-neogit-status.png)
> [gitlinker.nvim](https://github.com/AstroNvim/astrocommunity/tree/main/lua/astrocommunity/git/gitlinker-nvim) plugin provides via Astrocommunity

## GitHub Issues & Pull Requests
Expand Down
9 changes: 0 additions & 9 deletions docs/source-control/open-in-github.md

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ nav:
- Lazygit: source-control/lazygit.md
- Neogit: source-control/neogit.md
- Octo: source-control/octo.md
- Open In GitHub: source-control/open-in-github.md
- API tools:
- api-tools/index.md
- Ultra-Mobile Neovim:
Expand Down

0 comments on commit 4870362

Please sign in to comment.