Get Comfortable with Git (or JJ)

Version control is a legacy code superpower, but it is one that can take some getting used to!

One tactic is making commits where the only message is “WIP” or “Work in Progress”. These give you checkpoints that you can backtrack to if you find your attempt to fix things has made everything go wrong. You can jump backwards through time with git checkout HEAD~N, where N is the number of commits you want to undo. Have a look around and decide if that’s the right place, then create a new branch with git switch -c new-branch-name and carry on from that point. Later on you can clean up unneeded branches with git branch -d old-branch-name-1 old-branch-name-2.

The big downside of this approach is that your co…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help