oliverdavies.uk/content/node.4df98b71-9bff-4c1d-9636-5074e31a7ace.json
2025-05-11 20:02:14 +01:00

100 lines
No EOL
4.7 KiB
JSON

{
"uuid": [
{
"value": "4df98b71-9bff-4c1d-9636-5074e31a7ace"
}
],
"langcode": [
{
"value": "en"
}
],
"type": [
{
"target_id": "daily_email",
"target_type": "node_type",
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
}
],
"revision_timestamp": [
{
"value": "2025-05-11T08:59:58+00:00"
}
],
"revision_uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"revision_log": [],
"status": [
{
"value": true
}
],
"uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"title": [
{
"value": "Be more selective"
}
],
"created": [
{
"value": "2025-04-03T00:00:00+00:00"
}
],
"changed": [
{
"value": "2025-05-11T08:59:58+00:00"
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2025\/04\/03\/selective",
"langcode": "en"
}
],
"body": [
{
"value": "\n <p>Another common Git issue I see is people using <code>git add .<\/code> to commit every change in every file they have locally.<\/p>\n\n<p>Similar to <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2025\/04\/02\/commit\">committing with <code>-m<\/code><\/a>, this seems to be a common in Git tutorials, but can have consequences due to unexpected changes being staged and committed.<\/p>\n\n<p>Maybe there are unrelated changes in the same file or other files have been changed that you don't want to commit yet.<\/p>\n\n<p>What if something was committed and pushed that caused the CI pipeline to fail or break production?<\/p>\n\n<p>At the least, it's going to add time and delay getting the intended changes live as someone will need to revert and fix the commits or address the changes in a code review.<\/p>\n\n<p>I'm very selective about what I include in each commit to keep my code stable and the commits easy to review and, if needed, revert.<\/p>\n\n<p>I always use <code>git add -p<\/code> to interactively stage changes from the command line or use keybindings in my Neovim configuration to add particular lines.<\/p>\n\n<p>I'll also review my staged changes before committing and the commit once it's been made using <code>git log --stat<\/code> to see what's included.<\/p>\n\n<p>Only once I'm sure my commits include only what I intended will I push them or submit them for review.<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>Another common Git issue I see is people using <code>git add .<\/code> to commit every change in every file they have locally.<\/p>\n\n<p>Similar to <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2025\/04\/02\/commit\">committing with <code>-m<\/code><\/a>, this seems to be a common in Git tutorials, but can have consequences due to unexpected changes being staged and committed.<\/p>\n\n<p>Maybe there are unrelated changes in the same file or other files have been changed that you don't want to commit yet.<\/p>\n\n<p>What if something was committed and pushed that caused the CI pipeline to fail or break production?<\/p>\n\n<p>At the least, it's going to add time and delay getting the intended changes live as someone will need to revert and fix the commits or address the changes in a code review.<\/p>\n\n<p>I'm very selective about what I include in each commit to keep my code stable and the commits easy to review and, if needed, revert.<\/p>\n\n<p>I always use <code>git add -p<\/code> to interactively stage changes from the command line or use keybindings in my Neovim configuration to add particular lines.<\/p>\n\n<p>I'll also review my staged changes before committing and the commit once it's been made using <code>git log --stat<\/code> to see what's included.<\/p>\n\n<p>Only once I'm sure my commits include only what I intended will I push them or submit them for review.<\/p>\n\n ",
"summary": null
}
],
"feeds_item": [
{
"imported": "2025-05-11T08:59:58+00:00",
"guid": null,
"hash": "397621c34a88f800e52750829b4bc177",
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}