{
    "url": "https://delaparra-services.nl/manuals/werken-met-git",
    "locale": "en",
    "title": "Working with Git · DeLaParra Services",
    "description": "Save changes using commit, push and pull; experiment safely using a branch; and revert to a previous version.",
    "alternates": {
        "en": "https://delaparra-services.nl/manuals/werken-met-git",
        "nl": "https://delaparra-services.nl/nl/handleidingen/werken-met-git"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/manuals/werken-met-git.csv",
        "md": "https://delaparra-services.nl/manuals/werken-met-git.md",
        "json": "https://delaparra-services.nl/manuals/werken-met-git.json",
        "zip": "https://delaparra-services.nl/manuals/werken-met-git.zip",
        "pdf": "https://delaparra-services.nl/manuals/werken-met-git.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/manuals/werken-met-git.csv",
            "encodingFormat": "text/csv",
            "name": "werken-met-git.csv"
        },
        {
            "url": "https://delaparra-services.nl/manuals/werken-met-git.json",
            "encodingFormat": "application/json",
            "name": "werken-met-git.json"
        },
        {
            "url": "https://delaparra-services.nl/manuals/werken-met-git.md",
            "encodingFormat": "text/markdown",
            "name": "werken-met-git.md"
        },
        {
            "url": "https://delaparra-services.nl/manuals/werken-met-git.pdf",
            "encodingFormat": "application/pdf",
            "name": "werken-met-git.pdf"
        },
        {
            "url": "https://delaparra-services.nl/manuals/werken-met-git.zip",
            "encodingFormat": "application/zip",
            "name": "werken-met-git.zip"
        }
    ],
    "markdown": "Save changes using commit, push and pull; experiment safely using a branch; and revert to a previous version.\n\n## THE BASICS | What Git does for you.\n\nGit saves every version of your app. If something goes wrong, you can revert to a version that worked. Your AI assistant uses Git too, so it helps if you know the four words that crop up time and again.\n\n### 01 / Four words\n\n01. **Commit**: a saved version of your changes, with a brief description.\n02. **Push**: send your commits to GitHub.\n03. **Pull**: fetch changes from GitHub to your computer.\n04. **Branch**: a separate line of work. You try something out without affecting the working version.\n\n### 02 / One-off: setting your name\n\nGit includes a name and email address with every commit. Set these up once:\n\n```\ngit config --global user.name \"Je Naam\"\ngit config --global user.email \"jij@voorbeeld.nl\"\n```\n\nPlease use the email address associated with your GitHub account.\n\n## DAILY | Save changes.\n\nOpen the terminal in your project folder. Always carry out these four steps in the same order.\n\n### 03 / See what’s changed\n\n```\ngit status\n```\n\nRed indicates files that have been modified but not yet staged. Green indicates files that are ready to be committed.\n\n### 04 / Prepare your changes\n\n```\ngit add .\n```\n\nThe dot means: everything in this folder. Then use `git status` to check that there are no files in there that shouldn’t be shared, such as `.env`.\n\n### 05 / Make a commit\n\n```\ngit commit -m \"Contactformulier toegevoegd\"\n```\n\nJot down briefly what you’ve changed. That way, you’ll be able to find it again later.\n\n### 06 / Send it to GitHub\n\n```\ngit push\n```\n\n### 07 / Fetch changes\n\nDo you use two computers, or have I changed something? If so, please download the latest version before you start:\n\n```\ngit pull\n```\n\n## TRY IT OUT SAFELY | Working with a branch.\n\nA branch allows you to try something new without affecting the working version.\n\n### 08 / Create a branch\n\n```\ngit switch -c nieuw-menu\n```\n\nYou are now working in the ‘new-menu’ branch. Commit and push as usual. The first time, Git will ask you to carry out an extra step:\n\n```\ngit push -u origin nieuw-menu\n```\n\n### 09 / Back to the main version\n\n```\ngit switch main\n```\n\nDo you like the new version? If so, please open a **pull request** on GitHub to merge the branch. I can review it there before it goes live.\n\n## IF THINGS GO WRONG | Return to a previous version.\n\n### 10 / View history\n\n```\ngit log --oneline\n```\n\nOn each line, you’ll see a code and a description of a commit.\n\n### 11 / Discard changes you haven’t yet saved\n\n```\ngit restore .\n```\n\nThis discards all changes that you haven’t yet staged using `git add`. You cannot undo this.\n\n### 12 / Undoing a commit\n\n```\ngit revert abc1234\n```\n\nReplace abc1234 with the code from `git log --oneline`. Git will create a new commit that reverses the previous one. Your history will be preserved.\n\n### 13 / Ask your AI assistant for help\n\n\"Show what has changed since the last commit. Explain what each change does and ask for permission before you commit, push or delete anything.\"\n\n**Good to know**\nNever use `git push --force` or `git reset --hard` unless you know exactly what will be lost. If your AI assistant asks you to use one of these commands, ask first what will be lost.\n\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "TechArticle",
                "@id": "https://delaparra-services.nl/manuals/werken-met-git#article",
                "url": "https://delaparra-services.nl/manuals/werken-met-git",
                "headline": "Working with Git",
                "description": "Save changes using commit, push and pull; experiment safely using a branch; and revert to a previous version.",
                "inLanguage": "en",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/manuals/werken-met-git#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/manuals/werken-met-git#dataset",
                "name": "Working with Git",
                "description": "Save changes using commit, push and pull; experiment safely using a branch; and revert to a previous version.",
                "url": "https://delaparra-services.nl/manuals/werken-met-git",
                "identifier": "https://delaparra-services.nl/manuals/werken-met-git#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/manuals/werken-met-git#article"
                },
                "publisher": {
                    "@type": "Organization",
                    "name": "DeLaParra Services",
                    "url": "https://delaparra-services.nl/"
                },
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/manuals#dataset",
                    "name": "Manuals for working on your own app",
                    "url": "https://delaparra-services.nl/manuals"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "werken-met-git.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/manuals/werken-met-git.csv",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "werken-met-git.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/manuals/werken-met-git.json",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "werken-met-git.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/manuals/werken-met-git.md",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "werken-met-git.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/manuals/werken-met-git.pdf",
                        "inLanguage": "en"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "werken-met-git.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/manuals/werken-met-git.zip",
                        "inLanguage": "en"
                    }
                ]
            }
        ]
    }
}