pull down to refresh
23 sats \ 4 replies \ @k00b 8 Aug 2023 \ on: How do you feel about git? tech
The abstractions could be better, but it's a lot like bitcoin in that its fundamental nature is pretty much irreducible given the requirements its designed to meet.
I understand git probably better than most people but I still mess up a lot of the time because I haven't spent enough time learning how to communicate with the merkle DAG.
I found this book really helpful if anyone is looking to go deep on git: https://git-scm.com/book/en/v2
A few weeks ago, I used the command
$ git rebase --onto master local-dev <feature-branch>
for the first time and I felt like I ascended, lol
I used it to no longer keep untracked changes in my local repository (changes in
.next.config.js
and .env.sample
). I created a local-dev
branch and then create branches from that one.And before I push, I run this command so my local changes are no longer included in the branch.
Basically, it goes from this:
A---B---C---F---G (master branch) \ D---E---H---I (feature-branch) ^ (local-dev branch)
to this
A---B---C---F---G (master branch) \ \ \ E'---H'---I' (feature-branch) \ D ^ (local-dev branch)
reply
I have done this once but this is seriously bad ass. This is a great usage of this command!
reply
Same! It's a mind-blowing experience. It just works.
It's even more magical if you use Magit for Emacs. ;)
reply
Magic
reply