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 22:21
    verdie-g opened #893
  • Jan 28 10:19
    VonUniGE commented #340
  • Jan 28 02:20
    rcywongaa closed #869
  • Jan 26 20:30
    smkniazi edited #892
  • Jan 26 20:29
    smkniazi edited #892
  • Jan 26 20:28
    smkniazi opened #892
  • Jan 24 10:38
    timotheecour edited #890
  • Jan 24 09:20
    timotheecour opened #891
  • Jan 24 00:29
    timotheecour opened #890
  • Jan 23 22:09
    KeeReal commented #869
  • Jan 23 20:58
    avivey opened #889
  • Jan 21 23:26
    timotheecour commented #559
  • Jan 21 21:16
    koutcher commented #559
  • Jan 21 20:47
    koutcher commented #559
  • Jan 21 18:39
    smancill commented #559
  • Jan 21 07:11
    timotheecour commented #559
  • Jan 20 17:01
    smancill commented #559
  • Jan 20 10:25
    koutcher commented #559
  • Jan 20 02:54
    timotheecour commented #559
  • Jan 20 01:56
    timotheecour opened #888
Collin Peters
@collinpeters
tig version 2.3.0
Sebastian C
@sebsebmc
Does tig support bare repos?
Jonas Fonseca
@jonas
@collinpeters The default keybindings wire C in the main view, so you need to also add bind main C !git commit -v.
@sebsebmc Yes, it supports browsing bare repos. The status view is disabled though because there is no work tree.
Sebastian C
@sebsebmc
There's no way to specify a work-tree?
Igor Almeida
@igoralmeida
probably with git config directly
Jonas Fonseca
@jonas
@sebsebmc Specifying one with GIT_WORK_TREE or in the Git config file should work.
What Igor said.
Juanda
@juanzuluaga_twitter
Hello there! Noob question: When I'm in the refs view, is it possible to fuzzy find a branch? Or filter the list in any way?
Jonas Fonseca
@jonas
@juanzuluaga_twitter It's possible to set TIG_LS_REMOTE to a script or command that will output something similar to git show-refs --dereference
Christoph Berg
@df7cb
Is there a way to make it use git log --date-order instead of topo order?
Ah I see it now in .tigrc, I was only checking http://jonas.github.io/tig/doc/manual.html
Jonas Fonseca
@jonas
@/all Version 2.4.0 has been released. Thanks to everyone who contributed! https://github.com/jonas/tig/releases/tag/tig-2.4.0
Jonathan Oberländer
@L3viathan
Hi there! I'm looking to implement an ASCII representation of a (DA) graph in an unrelated application (nothing to do with Git, either). Does tig do the git graph visualization (in the main view) itself (in that case: where can I find the algorithm/the source of that), or does that come from some git command?
Jonathan Oberländer
@L3viathan
Ah, nevermind, I see it's a variant of git log --graph --oneline
Jonas Fonseca
@jonas
Tig builds the graph by parsing git-log output. Code is in src/graph-*.c
Nichlas Hummelsberger
@Nichlas
Hi Jonas, Have you considered building tig as a snap package?
Net
@net

I wonder what's causing jonas/tig#582, as escape seems to be already implemented:

https://github.com/jonas/tig/blob/master/src/prompt.c#L670-L672

Jonas Fonseca
@jonas
@Nichlas There is a snap configuration but it is using classic confinement and hasn't been accepted. Didn't have much time to figure out how to change the confinement.
Jonas Fonseca
@jonas
@net You are right. Are you using readline?
svenn71
@svenn71
How can I check out a single file from tree view in repository cloned with -n --depth 1?
Fujisan (富士山)
@fujisan43_twitter

I have the following in my .tigrc:

[tig]
   line-graphics = utf-8

and tig does not understand it:

tig warning: ~/.tigrc:1: Unknown option command: [tig]
tig warning: ~/.tigrc:2: Unknown option command: line-graphics
tig warning: Errors while loading /home/fuji/.tigrc.

What is wrong?

Fujisan (富士山)
@fujisan43_twitter
Ok, my bad.
in .tigrc, it should be:
set  line-graphics = utf-8
Thomas
@UncleInf
hello. is there diff file by file option? And/or diff side by side view? thanks
Jonas Fonseca
@jonas
No, side-by-side diff is the most voted feature, but I've not gotten around to implement it.
Matthew Lyon
@mattly
is there any hold up on the diff-so-fancy feature? jonas/tig#542
Mikhail Mirzoyan
@Seybo
Hi guys. I'm a newbie tig user and it feels like it is the thing that i was looking for long time. But there is a thing that i would really like to have there. Selected file path copying. Here is a usecase: I'm working in vim and then switch to tig, there i see a file with changes that i want to continue to work on. So i want to go back to vim and quickly open this file. By pasting it's path from buffer into my filesearch plugin. Is there a way i can do that?
Hsieh Chin Fan
@typebrook
bind generic xf +sh -c "echo -n %(file) | xclip -sel c && echo File Clipped"
Hsieh Chin Fan
@typebrook
I have code above in my .tigrc, press xf will copy file in current line into clipboard, and echo "File Clipped" in status bar.
Be aware the way woks with clipboard differs by OS. In this case, I use xclip in binding(Ubuntu) .
You should make your own based on your machine, go through docs for tigrc really helps.
Hsieh Chin Fan
@typebrook
Or just use tig built-in command, type :edit or press e can open current file in editor , see
https://github.com/jonas/tig/blob/6c1f9dde974319ca1b3aaa2c4d7fb9832eb4d0c7/tigrc#L303
Mikhail Mirzoyan
@Seybo
@typebrook thanks a lot! Works out of the box in my Ubuntu as well :)
Wish i had time for all the docs
i've seen :edit but it doesn't work for me as i want the file to be opened in my already opened vim session, not in a new one
Sebastian Gniazdowski
@psprint
Why there's no binding for git push? How to add one?
Why the binding doesn't work?
bind generic xf +sh -c "cat %(file) | pbcopy && echo File Copied Into The Cliboard (paste with Cmd-V)"
Sebastian Gniazdowski
@psprint
I've managed to add the binding for push. So what's left is only the above xf-binding that doesn't yield anything in the clipboard, and ends with "No output"
Hsieh Chin Fan
@typebrook
pbcopy is here so I guess you use mac. And here you want to store file content into clipboard.
Try to use command directly before set it as key binding, so you can try:
:!cat %(file)
to test it print file content correctly
Sebastian Gniazdowski
@psprint
@typebrook It's a funny thing because :!cat %(file) | pbcopy opens a pager
like if the redirection, the pipe was ignored and pbcopy not feed with the input
Ok, I've got it – it was the paren, it has to be quoted (syntax error otherwise)
Nitesh kumar
@smartnitesh
...
Mikhail Mirzoyan
@Seybo
is there an (easy) way to stash some changes from different files one by one but under the same stash?
Hsieh Chin Fan
@typebrook
There is an useful command you can put in .gitconfig as alias
[alias]
    stashstaged = !git stash --keep-index && \
                   git stash && \
                   git stash apply stash@{1} && \
                   git stash show -p | git apply -R && \
                   git stash drop stash@{1}
Literally, it just stash changes in staged area, so you can:
  1. only stage the changes/hunk you want to put into stash
  2. call :!git stashstaged
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.