Did you know 'tig status' ?
It's like a GUI for the famous git add [-p]
.
Select files with the up/down-keys and hit
-
u
for staging/unstaging the whole file -
Enter
for showing the diff of a file-
j
andk
to navigate in the diff -
u
again to stage/unstage chunks -
1
to stage/unstage only lines -
\
to split large chunks
-
-
F5
to refresh the view
Related cards:
A few git tips you didn't know about
Random list of useful git commands for advanced users. I found some of them useful.
How to push to Git without running CI on GitLab CI, GitHub Actions, or Travis CI
If a project ist configured to spawn CI runners for tests or deployment when pushing to the Repo, a habit of pushing WIP commits regularly may conflict with that.
Here are two solutions that allow you to keep pushing whenever you feel like it.
#...
Configuring Git with .gitconfig
Basic configuration
Please keep this config simple. It should be a starting point for new developers learning Git.
[user]
name = Your Name
email = your.name@domain.com
[branch]
sort = -committerdate
[color]
ui = auto
[color "bra...
Things you probably didn’t know you could do with Chrome’s Developer Console
Collection of useful tools in the Chrome JavaScript console.
Make the whole page editable
This is not special to Chrome, but still a clever thing:
document.body.contentEditable=true
Taking time
You can easily measure the ti...
Git: Improve your commits by reviewing changes one-by-one
Git commits should be very deliberate, and only contain changes that you really want to be in there. In order to reduce the chance to accidentally commit something you didn't intend, review your changes before committing.
My preferred way of d...
Using before(:context) / before(:all) in RSpec will cause you lots of trouble unless you know what you are doing
TL;DR Avoid before(:context)
(formerly before(:all)
), use before(:example)
(formerly before(:each)
) instead.
If you do use before(:context)
, you need to know what you are doing and take care of any cleanup yourself.
Why?
...
Geordi 9.6.0 released: new "did you know?" feature
Geordi will now suggest related commands and options (hand-picked). If a command has suggestions, a single suggestion is printed with a 10% probability after a successful command.
How to not leave trailing whitespace (using your editor or Git)
There is no reason to leave trailing whitespace characters in your project's files, so don't add any.
A git diff --check
will tell you if there are any and you should not commit when you see them. So go ahead and switch your editor/IDE to autom...
Capistrano 3: How to deploy when a firewall blocks your git repo
Sometimes, through some firewall or proxy misconfiguration, you might have to deploy to a server that cannot access the git repository.
Solution 1: HTTP Proxy (this is the preferred fix)
SSH can be tunneled over an HTTP Proxy. For example, wh...
Git: In an (interactive) rebase, find out which commit you are currently working on (until version < 1.7.9.5)
When you are using git rebase
and are currently editing a commit (due to a conflict, for example), you may want to know the current commit. [1]\
Luckily, there is lots of useful stuff in the .git
directory.