mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-05 21:46:49 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
273eb6244b | ||
|
|
467741fa54 | ||
|
|
a00bbf709f | ||
|
|
b90e66dca1 | ||
|
|
77eea90b0b | ||
|
|
79b012990b | ||
|
|
45c0b9404a | ||
|
|
50924f31b0 | ||
|
|
705d273ad3 | ||
|
|
30c6fc2300 | ||
|
|
16b202f227 | ||
|
|
7c1dbb7c66 | ||
|
|
41152881db | ||
|
|
d33fff54a3 | ||
|
|
3bf621de65 | ||
|
|
0c84055abd | ||
|
|
5d9df3ca07 | ||
|
|
6581bec1ce | ||
|
|
ce3f81a2d3 | ||
|
|
bc479a9bf5 | ||
|
|
83a9a6d1f5 | ||
|
|
ca0b3debe9 | ||
|
|
84a2b1ceb9 |
+29
-1
@@ -19,6 +19,9 @@ archive:
|
|||||||
windows: Windows
|
windows: Windows
|
||||||
386: i386
|
386: i386
|
||||||
amd64: x86_64
|
amd64: x86_64
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
format: zip
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
snapshot:
|
snapshot:
|
||||||
@@ -28,4 +31,29 @@ changelog:
|
|||||||
filters:
|
filters:
|
||||||
exclude:
|
exclude:
|
||||||
- '^docs:'
|
- '^docs:'
|
||||||
- '^test:'
|
- '^test:'
|
||||||
|
brew:
|
||||||
|
# Reporitory to push the tap to.
|
||||||
|
github:
|
||||||
|
owner: jesseduffield
|
||||||
|
name: homebrew-lazygit
|
||||||
|
|
||||||
|
# Your app's homepage.
|
||||||
|
# Default is empty.
|
||||||
|
homepage: "https://github.com/jesseduffield/lazygit/"
|
||||||
|
|
||||||
|
# Your app's description.
|
||||||
|
# Default is empty.
|
||||||
|
description: "A simple terminal UI for git commands, written in Go"
|
||||||
|
|
||||||
|
# # Packages your package depends on.
|
||||||
|
# dependencies:
|
||||||
|
# - git
|
||||||
|
# - zsh
|
||||||
|
|
||||||
|
# # Packages that conflict with your package.
|
||||||
|
# conflicts:
|
||||||
|
# - svn
|
||||||
|
# - bash
|
||||||
|
|
||||||
|
# test comment to see if goreleaser only releases on new commits
|
||||||
@@ -10,22 +10,14 @@ Are YOU tired of typing every git command directly into the terminal, but you're
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Via binary release
|
### Homebrew
|
||||||
You can download a binary release [here](https://github.com/jesseduffield/lazygit/releases)
|
```sh
|
||||||
You may need to grant execute permission via `chmod +x ./<filename>`.
|
brew tap jesseduffield/lazygit
|
||||||
You can move this file to your local /bin directory and rename to `lazygit` so that you can run it anywhere
|
brew install lazygit
|
||||||
(Easier-install coming soon)
|
```
|
||||||
|
|
||||||
### Via Go
|
|
||||||
In a terminal call this command:
|
|
||||||
`go get github.com/jesseduffield/lazygit`
|
|
||||||
(if you don't have Go installed, you can follow the installation guide [here](https://golang.org/doc/install).
|
|
||||||
|
|
||||||
Please note:
|
|
||||||
If you get an error claiming that lazygit cannot be found or is not defined, you may need to add `~/go/bin` to your $PATH (MacOS/Linux), or `%HOME%\go\bin` (Windows). Not to be mistaked for `C:\Go\bin` (which is for Go's own binaries, not apps like Lazygit)
|
|
||||||
|
|
||||||
### Ubuntu
|
### Ubuntu
|
||||||
Packages for Ubuntu 16.04 and up are available via Launchpad PPA.
|
Packages for Ubuntu 16.04, 18.04 and 18.10 are available via Launchpad PPA.
|
||||||
|
|
||||||
They are built daily, straight from master branch.
|
They are built daily, straight from master branch.
|
||||||
|
|
||||||
@@ -35,11 +27,23 @@ sudo apt-get update
|
|||||||
sudo apt-get install lazygit
|
sudo apt-get install lazygit
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Binary Release (Windows/Linux/OSX)
|
||||||
|
You can download a binary release [here](https://github.com/jesseduffield/lazygit/releases)
|
||||||
|
|
||||||
|
### Go
|
||||||
|
```sh
|
||||||
|
go get github.com/jesseduffield/lazygit
|
||||||
|
```
|
||||||
|
|
||||||
|
Please note:
|
||||||
|
If you get an error claiming that lazygit cannot be found or is not defined, you may need to add `~/go/bin` to your $PATH (MacOS/Linux), or `%HOME%\go\bin` (Windows). Not to be mistaked for `C:\Go\bin` (which is for Go's own binaries, not apps like Lazygit)
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Call `lazygit` in your terminal inside a git repository.
|
Call `lazygit` in your terminal inside a git repository.
|
||||||
If you want, you can also add an alias for this with `echo "alias lg='lazygit'" >> ~/.zshrc` (or whichever rc file you're using).
|
If you want, you can also add an alias for this with `echo "alias lg='lazygit'" >> ~/.zshrc` (or whichever rc file you're using).
|
||||||
Basic tutorial [Here](https://www.youtube.com/watch?v=VDXvbHZYeKY)
|
Basic tutorial [Here](https://www.youtube.com/watch?v=VDXvbHZYeKY)
|
||||||
|
|
||||||
[Keybindings](https://github.com/jesseduffield/lazygit/blob/master/docs/Keybindings.md)
|
[Keybindings](https://github.com/jesseduffield/lazygit/blob/master/docs/Keybindings.md)
|
||||||
|
|
||||||
## Cool features
|
## Cool features
|
||||||
|
|||||||
Executable
+54
@@ -0,0 +1,54 @@
|
|||||||
|
// call from project root with
|
||||||
|
// go run bin/push_new_patch.go
|
||||||
|
|
||||||
|
// goreleaser expects a $GITHUB_TOKEN env variable to be defined
|
||||||
|
// in order to push the release got github
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"log"
|
||||||
|
"os/exec"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
version, err := ioutil.ReadFile("VERSION")
|
||||||
|
if err != nil {
|
||||||
|
log.Panicln(err.Error())
|
||||||
|
}
|
||||||
|
stringVersion := string(version)
|
||||||
|
fmt.Println("VERSION was " + stringVersion)
|
||||||
|
|
||||||
|
runCommand("git", "pull")
|
||||||
|
|
||||||
|
splitVersion := strings.Split(stringVersion, ".")
|
||||||
|
patch := splitVersion[len(splitVersion)-1]
|
||||||
|
newPatch, err := strconv.Atoi(patch)
|
||||||
|
splitVersion[len(splitVersion)-1] = strconv.FormatInt(int64(newPatch)+1, 10)
|
||||||
|
newVersion := strings.Join(splitVersion, ".")
|
||||||
|
|
||||||
|
err = ioutil.WriteFile("VERSION", []byte(newVersion), 0644)
|
||||||
|
if err != nil {
|
||||||
|
log.Panicln(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
runCommand("git", "add", "VERSION")
|
||||||
|
runCommand("git", "commit", "-m", "\"bump version to "+newVersion+"\"", "--", "VERSION")
|
||||||
|
runCommand("git", "push")
|
||||||
|
runCommand("git", "tag", newVersion)
|
||||||
|
runCommand("git", "push", "origin", newVersion)
|
||||||
|
runCommand("goreleaser", "--rm-dist")
|
||||||
|
}
|
||||||
|
|
||||||
|
func runCommand(args ...string) {
|
||||||
|
fmt.Println(strings.Join(args, " "))
|
||||||
|
output, err := exec.Command(args[0], args[1:]...).CombinedOutput()
|
||||||
|
if err != nil {
|
||||||
|
panic(err.Error())
|
||||||
|
}
|
||||||
|
log.Print(string(output))
|
||||||
|
}
|
||||||
@@ -74,6 +74,9 @@ func handleAddPatch(g *gocui.Gui, v *gocui.View) error {
|
|||||||
if !file.HasUnstagedChanges {
|
if !file.HasUnstagedChanges {
|
||||||
return createErrorPanel(g, "File has no unstaged changes to add")
|
return createErrorPanel(g, "File has no unstaged changes to add")
|
||||||
}
|
}
|
||||||
|
if !file.Tracked {
|
||||||
|
return createErrorPanel(g, "Cannot git add --patch untracked files")
|
||||||
|
}
|
||||||
gitAddPatch(g, file.Name)
|
gitAddPatch(g, file.Name)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -306,7 +306,7 @@ func getOpenCommand() (string, string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func gitAddPatch(g *gocui.Gui, filename string) {
|
func gitAddPatch(g *gocui.Gui, filename string) {
|
||||||
runSubProcess(g, "git", "add", "-p", filename)
|
runSubProcess(g, "git", "add", "--patch", filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
func editFile(g *gocui.Gui, filename string) (string, error) {
|
func editFile(g *gocui.Gui, filename string) (string, error) {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
TnB8I+swjicHuGTXk3ncm1Aaa12eIJqWV/Lhcnbb01i39p6+fyn3vDMdWPcejt3R8gcJqv4wyP8UQVO9G1qkLppt6V/qAuY5x6nX0MgEa3t+8JLJnGYHZYsuIgan/ecAmeu5+6dgUhr9Oq6zQOEv/O88NsALzMlqnEQNXI8XSoScfhkiVDIp3zWov0vBizCdThnNgTx9zRpJVoqxmhWvgt+me2+fOhSx1Y+3ZA2gE7zq8IFAbxp36d0rsR5lKqmTuF+YsF9iQ7Ar+xCjbRunLsZx+VwGqGfpS/qS7EwsEqBI0vEO76eFJkwEsIzOvJiFNhBDUu3upquBFMT4uzxRxH3eV+J4mZtu29UDLdvKI5Q730Lk9AgmH4now+RmP08M0SEXJa+AnHeuBv2u1iU5bu+sI6CORVQzKQwOph9AABDjSZ54wrXIpYEeIW2sz8nx+hiG6QL1mqfM/l+55BR69u3vxKYMryQBxPuzhZCTOqqI4uahlb6GIUNZJ9vGZeIA9HFJq3ymW8cdrpYzhKf3Nx9jK+Yb81h5/AHq9iChXEC63VPCDXXGRllh2UYWNYCaAdtk+ekpLR8299e4CaEregy6g5U2S3/xrBKl87miu1uJ/fquXoxGdSU+JcmsmXZ26sGIU2TCYdNjSfIgpOyfMmB4JNtKHqWRHA9Fe42CRpA=
|
|
||||||
Reference in New Issue
Block a user