Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 28 2019 22:21
    verdie-g opened #893
  • Jan 28 2019 10:19
    VonUniGE commented #340
  • Jan 28 2019 02:20
    rcywongaa closed #869
  • Jan 26 2019 20:30
    smkniazi edited #892
  • Jan 26 2019 20:29
    smkniazi edited #892
  • Jan 26 2019 20:28
    smkniazi opened #892
  • Jan 24 2019 10:38
    timotheecour edited #890
  • Jan 24 2019 09:20
    timotheecour opened #891
  • Jan 24 2019 00:29
    timotheecour opened #890
  • Jan 23 2019 22:09
    KeeReal commented #869
  • Jan 23 2019 20:58
    avivey opened #889
  • Jan 21 2019 23:26
    timotheecour commented #559
  • Jan 21 2019 21:16
    koutcher commented #559
  • Jan 21 2019 20:47
    koutcher commented #559
  • Jan 21 2019 18:39
    smancill commented #559
  • Jan 21 2019 07:11
    timotheecour commented #559
  • Jan 20 2019 17:01
    smancill commented #559
  • Jan 20 2019 10:25
    koutcher commented #559
  • Jan 20 2019 02:54
    timotheecour commented #559
  • Jan 20 2019 01:56
    timotheecour opened #888
Sorin Sbarnea
@ssbarnea
i really want to stop using gui git clients and replace them with a tui tool but someone I fail to figure out how to perform basic operations with tig, like commit current changes as new commit, ammend, pull, push. Someone the introduction documentation does not cover stuff line this.
Hsieh Chin Fan
@typebrook

Nope, the default configuration doesn't cover those commands. (Check https://github.com/jonas/tig/blob/master/tigrc or just press h to enter help view)
But since tig is just a pager for git commands, what make it powerful is you can bind your own commands/scripts with keys in different view.s

Here is my own .tigrc, nearly make me perform all frequently-used git commands in few seconds. For example:
c to commit with only title (in status view)
Cto have a full commit (in status view)
a to amend previous commit (in main and status view)
F to fetch current branch (in main view)
C-F to fetch remote in current line (in main view)
pp to directory push to remote of current branch
pP to force push
pr to push a given remote
pd to delete remote branch

Take a look and you'll find .tigrc is self-explained and so easy to configure. (Also, don't forget to read man tigrc)

Hsieh Chin Fan
@typebrook
And of course, you can always perform command at bottom line with decorator :
       !   Run the command in the foreground with
           output shown.

       @   Run the command in the background with no
           output.

       +   Run the command synchronously, and echo the
           first line of output to the status bar.

       ?   Prompt the user before executing the
           command.

      >  For a new tig instance

       <   Exit Tig after executing the command.
Sorin Sbarnea
@ssbarnea
thanks for the update. Still there is a serious issue with the approach of "do everything via git". It makes the tool less portable because everyone would have to sync the tool configuration to a never ending list of machines. Also means that if I step in on someone else terminal to help with something i will be guaranteed to miss my custom aliases.
that is why I value a tool that does not need customization, so I can just install it and ripe the benefits.
(basic operations, i do not expect to implement everything). there is a lot of value in aliases.
Hsieh Chin Fan
@typebrook
If you think the tig's default key-bindings is not enough, then I'll suggest lazygit
Sorin Sbarnea
@ssbarnea
Thanks for the hint, at least on paper it looks like what I was looking for. Sadly, first command caused jesseduffield/lazygit#501
Sebastian Gniazdowski
@psprint
Can you somehow send a command to tig through e.g. a file? I want to change the current directory from the outside of tig
Sebastian Gniazdowski
@psprint
Isn't this possible?
Sebastian Gniazdowski
@psprint
Really no way to do this?
Sebastian Gniazdowski
@psprint
Or can you maybe change the PWD of tig at all?
/j #gentoo
Hsieh Chin Fan
@typebrook
Not sure what you mean, could you describe more about what you want to achieve?
Sebastian Gniazdowski
@psprint
I want to write a Zsh plugin that would attach tmux session with tig running in it, automatically cd-ing into the current directory
Hsieh Chin Fan
@typebrook
I am not sure if it is possible. But I think quit tig and relaunch it when directory changes would be good enough
Sebastian Gniazdowski
@psprint
Yes I thought about this too
Paolo
@ear
hello, was wondering, is it possible to set the default sort-field for ref-view? I can't find it in man tig nor in man tigrc
(also a bit flummoxed that setting sort-filed = date and then inverting it with 'I' puts the header, "All references", at the bottom!)
Piotr Zierhoffer
@pzierhoffer_gitlab
Hi everyone. I'm looking for an option to add a binding that will search for a result of a bash command. To be precise, I'd want to do something like /!git merge-base %(commit) master, but of course the syntax does not work like that. Is this solvable?
Martin Uddén
@CMartinUdden
Is it possible to create a powerline-like status line in tig? It seems that control of the status line is not possible right now from configuration?
Erik Berdonces Bonelo
@Sturgelose

Hey there, I'm starting with Tig and I love, it, but I'm having some trouble with switching views.... Mostly, what I want is to stage a chunk of a file

For example, I open tig status to open status view.
Then I select the file I want to stage (move with arrows <up> <down> and then press <enter>). This splits the view in two.
Here, I'd guess I can switch to the new view pressing <tab>, and then move in that view with <up> <down> arrows, but it's not the case. I can only move with <j> and <k>, and the focus window changes if I press <tab>.

Is this the expected behaviour or I may have found a bug? (I'm in MacOS and tried already with bash and zsh shell)

Dmitry Valter
@dvalter
@Sturgelose looks like it's not the case by default. Help (h) says they [<Down> and j]'re binded to different actions.
Anyway you may configure it in tigrc like
$ cat ~/.tigrc 
bind generic <Down> move-down
bind generic <Up> move-up
Ben LeMasurier
@benlemasurier
is it possible to get a log view for single file?
Hsieh Chin Fan
@typebrook

@benlemasurier
use tig --[file] directly

if you want to do it inside tig, just add binding like:

bind tree m >tig -- %(file)
Ben LeMasurier
@benlemasurier
makes sense. thank you
Sebastian Gniazdowski
@psprint
I have a feature request: could a TIGRC_EXTRA be added, to point to an additional configuration file?
I'm thinking about creating a plugin for Zsh, but also possibly for Bash, that would supply e.g.: a bindings that would display a fzf-backed list of Makefile targets and run a selected target. To supply such additional functionality in a pluggable fashion I would need that environment variable
Sebastian Gniazdowski
@psprint
I've created a PR with this extension: #970
Sebastian Gniazdowski
@psprint
And here's the plugin, I've managed to accomplish the goal without TIGRC_EXTRA, however I still think that it would be a meanigful extension and I'm hoping for #970 merging. The plugin: https://github.com/zdharma/zsh-tig-plugin
Hsieh Chin Fan
@typebrook
Wow! I'll give it a try later
Ruslan Yakauleu
@QuAzI
Hi! Does tig can show file (f) with highlight for changed rows? Any quick navigation available (next change/prev change) in this mode? Can file view mode (f) been opened on position same with currently selected line (from diff mode)?
Hathor
@oshodeva_twitter
Hello
Sebastian Gniazdowski
@psprint
Hi
Sebastian Gniazdowski
@psprint
Oh, my view started to divide horizontally instead of vertically, how to revert to the previous behavior?
ah, I've removed my config, ok
Sorin Sbarnea
@ssbarnea
@psprint remember to git yout tig! ;)
Sebastian Gniazdowski
@psprint
hehe yes :) I've did this, so it's all back to normal now :)
Kapil Thangavelu
@kapilt
So I’ve been wondering is it possible to program a view in tig? Custom views are great, but is the answer entering a separate curses prog from that view?
Pavel Roskin
@proski
Can somebody have a look at my PR #983? It fixes vertical lines in Putty. When in the UTF-8 graphic mode, tig uses UTF-8 characters for graphs and curses drawing lines for other vertical lines (window separators and line number separators). That's inconsistent. With my change, only UTF-8 symbols are used in the UTF-8 mode. I added a test for vertical lines in all 3 modes.
Landon Gilbert-Bland
@vimalloc
Aloha. With git diff it highlights trailing whitespace in red. Is it possible to have that behavior when looking over code changes with tig? I tried playing the W / :toggle ignore-space, but can't get the trailing whitespace displayed.
Hsieh Chin Fan
@typebrook
@vimalloc
add set diff-highlight = true in your tigrc and tig will use diff-highlight in your PATH
Sebastian Gniazdowski
@psprint
I'm having problems to undestand how u works. Shouldn't it stage/unstage the currently active block? Instead, it does that with the top block or all blocks… … …
Johannes Altmanninger
@krobelus
@psprint > Shouldn't it stage/unstage the currently active block?
That works for me, it only stages all blocks in a file if I select the file
Sebastian Gniazdowski
@psprint
@krobelus and it stages unstages only the selected blocks?
Johannes Altmanninger
@krobelus
@psprint yes, only the selected block which is bounded by the hunk markers starting with @@
the cursor needs to be within the hunk
Ruslan Yakauleu
@QuAzI
Can tig show tree of changed files since last merge with master?
Something like git diff --name-only HEAD..master but with tree of files at left side?
Or maybe git can do something like tree?
1 reply
maletin
@maletin

is anybody using the Triangular Work Flow?
per default i pull from remote-1 and push to remote-2.

$ git status
On branch master
Your branch is up to date with 'remote-1/master'.
nothing to commit, working tree clean

here i miss the information Your branch is ahead of 'remote-2/master' by 1 commit.

$ git push
To /tmp/demo/remote-2/.
   727c2ed..588321f  master -> master

is it a good idea to get this information from .git/config and display it in refs-view and status-view?