975
Review Please (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] Faresh@lemmy.ml 9 points 4 months ago

When using git and are working on a feature, and suddenly want to work on something else, you can use git stash so git remembers your changes and is able to restore them when you are done. There is also git add -p this allows you to stage only certain lines of a file, this allows you to keep commits to a single feature if you already did another change that you didn't commit (this is kind of error prone, since you have to make sure that the commit includes exactly the things that you want it to include, so this solution should be avoided). But the easiest way is when you get the feeling that you have completed a certain task towards your goal and that you can move on to another task, to commit. But if you fail you can also change the history in git, so if you haven't pushed yet, you can move the commits around or, if you really need to, edit past commits and break them into multiple.

[-] howrar@lemmy.ca 8 points 4 months ago

Instructions unclear. Stash is 35 tall and I'm scared to look at what's been fermenting at the bottom.

[-] magic_lobster_party@kbin.run 3 points 4 months ago

Only 35? That’s rookie numbers.

this post was submitted on 29 Mar 2024
975 points (98.3% liked)

Programmer Humor

18907 readers
390 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS