DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

Do you use some kind of GUI for git, and if you do, when do you have to resort to terminal?

Currently I use VSCode, and I almost never resort to Version Control tab, but when I do, it is convenient.

VSCode Version Control

For commands starting with git I commonly used are

git add .
git commit ...
git push ...
git pull ...
git submodule ...
git worktree ...
git branch ...
git rm --cache ... 
Enter fullscreen mode Exit fullscreen mode

Never used git checkout, the GUI already helped for checking out.

I will try to use these more

git merge ...
git commit --amend
git rebase -i
Enter fullscreen mode Exit fullscreen mode

And I might try to use git push -f less.

For non-directly git, I use

git config --global core.editor nano
gi node,macos > .gitignore
java -jar ~/bfgTAB --delete-files *** && git reflog expire --expire=now --all && git gc --prune=now --aggressive
# Might be safer than git filter-branch --tree-filter 'git clean -f -X' -- --all
Enter fullscreen mode Exit fullscreen mode

gi is https://docs.gitignore.io/install/command-line#macos-bash

Perhaps I should try this as well.

git cz
Enter fullscreen mode Exit fullscreen mode

Top comments (8)

Collapse
 
kendalmintcode profile image
Rob Kendal {{☕}}

I used to use VS Code's built-in Git GUI, which was nice, but I started running into issues with it and I find its diff not to my tastes.

After that, I've been using Fork. It's super simple, nice and clean and clear and works well on different platforms. I've never had to resort to terminal and I prefer the visual aspect of dealing with potentially tricky git operations.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Looks nice.

Have you have tried GitHub Desktop, or something else?

I wonder what does "Free Evaluation" means.

Collapse
 
kendalmintcode profile image
Rob Kendal {{☕}}

Oh yeah, forgot about that one: I do use GitHub desktop, but I find it doesn’t play well with third party repos. And it’s a little limited in doing some for things. But it is ace.

Not sure about the ‘free evaluation’ part. I’ve been using it for months without needing to purchase it.

Collapse
 
jessekphillips profile image
Jesse Phillips • Edited

I use gitk and git gui. The command line is critical to my rebase and fixup commits. I also use the command line for branch navigation and everything else not graph, commit, or merge related.

I am explicit about my actions, I don't rely on tracking configuration to know what I want to do today.

Collapse
 
waylonwalker profile image
Waylon Walker

I used to use vscode's git interface, but It was so slow for me and would randomly lock up requiring a restart fo vscode, so I turned it completely off and only use the terminal. I find it convenient that I can get to it with a keyboard shortcut. I use forgit, which gives a bit better terminal user interface with fuzzy matching. The one thing that I miss from turning off git in vscode is the nice diffs in my editor.

GitHub logo wfxr / forgit

💤 A utility tool powered by fzf for using git interactively.

forgit

Shell License

forgit is a utility tool powered by fzf for using git interactively.

Installation

Make sure you have fzf installed.

Try Online

Run the following command in your shell to try forgit without installing:

Bash and ZSH
source <(curl -Ss https://raw.githubusercontent.com/wfxr/forgit/master/forgit.plugin.zsh)
Fish
source (curl -Ss https://raw.githubusercontent.com/wfxr/forgit/master/forgit.plugin.fish | psub)

Installation using a ZSH Plugin manager

Zplug

zplug 'wfxr/forgit'

Zgen

zgen load 'wfxr/forgit'

Antigen

antigen bundle 'wfxr/forgit'

Manual Installation

Download and source forgit.plugin.zsh, forgit.plugin.sh, or forgit.plugin.fish in your shell config.

Commands

ga

Interactive git add selector

screenshot

glo

Interactive git log viewer

screenshot

The log graph can be disabled by option FORGIT_LOG_GRAPH_ENABLE (see discuss in issue #71).

gi

Interactive .gitignore generator

screenshot

gd

Interactive git diff viewer

grh

Interactive git reset HEAD <file> selector

gcf

Interactive git checkout <file> selector

gss

Interactive git stash viewer

gclean

Interactive git clean selector

Default keybinds

Keybind
Collapse
 
benjioe profile image
Benjioe

For add/commit, I prefer to use the VScode tab because It’s easier to see what changes.
For git push I use the vscode action menu (ctrl+shift+p) so I don’t have to open a new terminal.
For search in a file history I use the awesome Git History Diff extension.
For more complex searches (like –grep…), I use the terminal and the Git History Diff input ref command to visualise the commit

Collapse
 
avalander profile image
Avalander

I always use the CLI for git. I felt that most GUIs aren't significantly easier to use.

Collapse
 
jonnyeom profile image
Jonny Eom

Same. I feel safer in the command line. I feel in more control