Lucas E M M. opinions

All praise stash

git

Today I figured a pretty cool git command. Up to this day, sometimes I get a bit disorganized with the branches, and git stash came to save the day (or at least some working stamina).

Here is the procedure:

“Oh no! I forgot to change the branch before making changes”

git stash save "name of the mistake"

Now, moving to the correct branch

git checkout the-correct-branch

Recover the modifications

git stash pop

And, a nice command:

git stash list

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: All praise stash

Remap your keyboard!

config

Why? Well, because as an emacs user, you are probably tired of your pinky trip to ctrl in order to do the “chords”.

I would assume, hypothetical reader, that you have already tried changing caps for ctrl. Well that’s nice, however, let me introduce you the better idea (giving credit where is due, thanks for this Umgeher!).

It is a lot more comfortable and an easier transition to change shift->ctrl and caps->shift. The muscle memory for shift stays the same and ctrl is in a much more comfortable position. Here is xmodmap script to arrange that:

! making shift ctrl and caps shift

remove Lock = Caps_Lock
remove Shift = Shift_L
remove Control = Control_L
keysym Caps_Lock = Shift_L
keysym Shift_L = Control_L
keysym Control_L = Control_L
add Lock = Caps_Lock
add Shift = Shift_L
add Control = Control_L

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Remap your keyboard!

Patching your way to contribution!

git version

Hypothetical reader, I know what you are thinking. You have some interesting projects, but I am not sure to engage on those because on source hut there is no way to make a pull request (at least, I have never found to the day of this writing).

Well, this make a nice oportunity to learn about patch in git! So, the magical command I use

git format-patch -x

where x is the number of commits that I did or

git format-patch branch-name

where branch-name is what you expect =] (source).

A nice recommendation by Umgeher is as follows. It will give some information per line, like who wrote the commit or put the tag, for instance. To do so, make a little tweak on ~/.gitconfig:

[sendemail]
annotate = yes
[tag]
forceSignAnnotated = true

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Patching your way to contribution!