mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-02 12:06:48 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a253b0b897 | ||
|
|
5ca47c3f47 | ||
|
|
456c593c72 | ||
|
|
3b264806ef | ||
|
|
7add598235 | ||
|
|
30d79bfa2c | ||
|
|
4d9d2b134f | ||
|
|
6cb0a14f33 |
+1
-8
@@ -14,8 +14,6 @@ before_install:
|
||||
# Download the binary to bin folder in $GOPATH
|
||||
# - curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-386 -o $GOPATH/bin/dep
|
||||
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
- ls
|
||||
- ls */*
|
||||
# Make the binary executable
|
||||
- chmod +x $GOPATH/bin/dep
|
||||
- ls $GOPATH/bin/
|
||||
@@ -27,15 +25,10 @@ script:
|
||||
# - go get -v ./...
|
||||
# - diff -u <(echo -n) <(gofmt -d .) # can't make gofmt ignore vendor directory
|
||||
# - go vet $(go list ./... | grep -v /vendor/)
|
||||
- gox -os="linux darwin windows" -arch="amd64" -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -verbose ./...
|
||||
- if [ "${LATEST}" = "true" ]; then gox -os="linux darwin windows" -arch="amd64" -ldflags "-X main.Rev=`git rev-parse --short HEAD` -X main.builddate=`date -u +%Y%m%d.%H%M%S`" -verbose ./...; fi
|
||||
- mv lazygit_windows_amd64.exe lazygit_windows_amd64_${TRAVIS_TAG}.exe
|
||||
- mv lazygit_darwin_amd64 lazygit_darwin_amd64_${TRAVIS_TAG}
|
||||
- mv lazygit_linux_amd64 lazygit_linux_amd64_${TRAVIS_TAG}
|
||||
- chmod +x ./lazygit_windows_amd64_${TRAVIS_TAG}.exe
|
||||
- chmod +x ./lazygit_darwin_amd64_${TRAVIS_TAG}
|
||||
- chmod +x ./lazygit_linux_amd64_${TRAVIS_TAG}
|
||||
- ls
|
||||
- ls */*
|
||||
deploy:
|
||||
provider: releases
|
||||
skip_cleanup: true
|
||||
|
||||
@@ -9,16 +9,20 @@ Are YOU tired of typing every git command directly into the terminal, but you're
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
### Via binary release
|
||||
You can download a binary release [here](https://github.com/jesseduffield/lazygit/releases)
|
||||
You may need to grant execute permission via `chmod +x ./<filename>`.
|
||||
You can move this file to your local /bin directory and rename to `lazygit` so that you can run it anywhere
|
||||
(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).
|
||||
|
||||
Then just 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).
|
||||
|
||||
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)
|
||||
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
|
||||
Packages for Ubuntu 16.04 and up are available via Launchpad PPA.
|
||||
@@ -31,6 +35,13 @@ sudo apt-get update
|
||||
sudo apt-get install lazygit
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
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).
|
||||
Basic tutorial [Here](https://www.youtube.com/watch?v=VDXvbHZYeKY)
|
||||
[Keybindings](https://github.com/jesseduffield/lazygit/blob/master/docs/Keybindings.md)
|
||||
|
||||
## Cool features
|
||||
- Adding files easily
|
||||
- Resolving merge conflicts
|
||||
@@ -45,14 +56,12 @@ sudo apt-get install lazygit
|
||||
### Viewing commit diffs
|
||||

|
||||
|
||||
## Docs
|
||||
[Keybindings](https://github.com/jesseduffield/lazygit/blob/master/docs/Keybindings.md)
|
||||
|
||||
## Milestones
|
||||
- [ ] Easy Installation (homebrew, release binaries)
|
||||
- [ ] Configurable Keybindings
|
||||
- [ ] Configurable Color Themes
|
||||
- [ ] Spawning Subprocesses (help needed - have a look at https://github.com/jesseduffield/lazygit/pull/18)
|
||||
- [ ] Maintainability
|
||||
- [ ] Performance
|
||||
- [ ] i18n
|
||||
|
||||
|
||||
@@ -225,14 +225,28 @@ func layout(g *gocui.Gui) error {
|
||||
v.FgColor = gocui.ColorWhite
|
||||
}
|
||||
|
||||
if v, err := g.SetView("options", -1, optionsTop, width, optionsTop+2, 0); err != nil {
|
||||
version := Rev
|
||||
if version == "" {
|
||||
version = "unversioned"
|
||||
}
|
||||
|
||||
if v, err := g.SetView("options", -1, optionsTop, width-len(version)-2, optionsTop+2, 0); err != nil {
|
||||
if err != gocui.ErrUnknownView {
|
||||
return err
|
||||
}
|
||||
v.BgColor = gocui.ColorDefault
|
||||
v.FgColor = gocui.ColorBlue
|
||||
v.Frame = false
|
||||
v.Title = "Options"
|
||||
}
|
||||
|
||||
if v, err := g.SetView("version", width-len(version)-1, optionsTop, width, optionsTop+2, 0); err != nil {
|
||||
if err != gocui.ErrUnknownView {
|
||||
return err
|
||||
}
|
||||
v.BgColor = gocui.ColorDefault
|
||||
v.FgColor = gocui.ColorGreen
|
||||
v.Frame = false
|
||||
renderString(g, "version", version)
|
||||
|
||||
// these are only called once
|
||||
handleFileSelect(g, filesView)
|
||||
|
||||
@@ -12,8 +12,12 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
startTime time.Time
|
||||
debugging bool
|
||||
startTime time.Time
|
||||
debugging bool
|
||||
Rev string
|
||||
builddate string
|
||||
debuggingPointer = flag.Bool("debug", false, "a boolean")
|
||||
versionFlag = flag.Bool("v", false, "Print the current version")
|
||||
)
|
||||
|
||||
func homeDirectory() string {
|
||||
@@ -58,11 +62,14 @@ func navigateToRepoRootDirectory() {
|
||||
}
|
||||
|
||||
func main() {
|
||||
debuggingPointer := flag.Bool("debug", false, "a boolean")
|
||||
flag.Parse()
|
||||
startTime = time.Now()
|
||||
debugging = *debuggingPointer
|
||||
devLog("\n\n\n\n\n\n\n\n\n\n")
|
||||
startTime = time.Now()
|
||||
flag.Parse()
|
||||
if *versionFlag {
|
||||
fmt.Printf("rev=%s, build date=%s", Rev, builddate)
|
||||
os.Exit(0)
|
||||
}
|
||||
verifyInGitRepo()
|
||||
navigateToRepoRootDirectory()
|
||||
run()
|
||||
|
||||
Reference in New Issue
Block a user