{"id":25949697,"url":"https://github.com/peachtj/branchingexercise","last_synced_at":"2026-06-01T03:32:22.664Z","repository":{"id":280326018,"uuid":"941628140","full_name":"PeachTj/BranchingExercise","owner":"PeachTj","description":"BranchingExercise from The Git \u0026 Github Bootcamp","archived":false,"fork":false,"pushed_at":"2025-03-02T18:41:06.000Z","size":3,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"harry","last_synced_at":"2025-03-02T19:28:32.055Z","etag":null,"topics":["git"],"latest_commit_sha":null,"homepage":"https://www.udemy.com/course/git-and-github-bootcamp/learn/lecture/25115344#questions","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PeachTj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-02T18:23:59.000Z","updated_at":"2025-03-02T18:41:09.000Z","dependencies_parsed_at":"2025-03-02T19:28:46.943Z","dependency_job_id":"aea9296b-6783-471e-a4a0-c9e28f57a564","html_url":"https://github.com/PeachTj/BranchingExercise","commit_stats":null,"previous_names":["peachtj/branchingexercise"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeachTj%2FBranchingExercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeachTj%2FBranchingExercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeachTj%2FBranchingExercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeachTj%2FBranchingExercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeachTj","download_url":"https://codeload.github.com/PeachTj/BranchingExercise/tar.gz/refs/heads/harry","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241847292,"owners_count":20030222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git"],"created_at":"2025-03-04T12:28:45.342Z","updated_at":"2026-06-01T03:32:22.618Z","avatar_url":"https://github.com/PeachTj.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git branching\n\n## 1. Viewing Branches\n\nUse `git branch` to view your existing branches,\\Look for the * which indicates the branch you are currently on.\n\n## 2.Creating Branches\n\nUse `git branch \u003cbranch-name\u003e` to make a new branch based upon the current HEAD. lt does not switch you to that branch (the HEAD stays the same.\n\n## 3.Switching Branches\n\nOnce you have created a new branch use `git switch \u003cbranch-name\u003e` to switch to it.\n\nUse `git switch -c \u003cbranch-name\u003e` to create a new branch AND switch to it all in one go.\n\n# Branching Exercise\n\n1. Make a new folder called `Patronus`\n\n2. Make a new git repo inside the folder (make sure you're not in an existing repo)\n\n3. Create a new file called `patronus.txt` (leave it empty for now)\n\n4. Add and commit the empty file, with the message \"add empty patronus file\"\n\n5. Immediately make a new branch called `harry` and another branch called `snape` (both based on the master branch)\n\n6. Move to the `harry` branch using the \"new\" command to change branches.\n\n7. In the `patronus.txt` file, add the following:\n\n   ```\n   HARRY'S PATRONUS\n   \n      /|       |\\\\\n   `__\\\\\\\\       //__'\n      ||      ||\n    \\\\__`\\\\     |'__/\n      `_\\\\\\\\   //_'\n      _.,:---;,._\n      \\\\_:     :_/\n        |@. .@|\n        |     |\n        ,\\\\.-./ \\\\\n        ;;`-'   `---__________-----.-.\n        ;;;                         \\\\_\\\\\n        ';;;                         |\n         ;    |                      ;\n          \\\\   \\\\     \\\\        |      /\n           \\\\_, \\\\    /        \\\\     |\\\\\n             |';|  |,,,,,,,,/ \\\\    \\\\ \\\\_\n             |  |  |           \\\\   /   |\n             \\\\  \\\\  |           |  / \\\\  |\n              | || |           | |   | |\n              | || |           | |   | |\n              | || |           | |   | |\n              |_||_|           |_|   |_|\n             /_//_/           /_/   /_/\n   ```\n\n8. Add and commit the changes, with the commit message \"add harry's stag patronus\"\n\n9. Move over to the `snape` branch using the \"older\" command to change branches.\n\n10. Put the following text in  the `patronus.txt` file:\n\n````\n```\nSNAPE'S PATRONUS\n                   .     _,\n                   |`\\\\__/ /\n                   \\\\  . .(\n                    | __T|\n                   /   |\n      _.---======='    |\n     //               {}\n    `|      ,   ,     {}\n     \\\\      /___;    ,'\n      ) ,-;`    `\\\\  //\n     | / (        ;||\n     ||`\\\\\\\\        |||\n     ||  \\\\\\\\       |||\n     )\\\\   )\\\\      )||\n     `\"   `\"      `\"\"\n```\n````\n\n1. Add and commit the changes on the `snape` branch with the commit message \"add snape's doe patronus\"\n2. Next, create a new branch based upon the `snape` branch called `lily`\n3. Move to the `lily` branch\n4. Edit the `patronus.txt` file so that it says `LILY'S PATRONUS` at the top instead of `SNAPE'S PATRONUS` (leave the doe ascii-art alone)\n5. Add and commit the change with the message \"add lily's doe patronus\"\n6. Run a git command to list all branches (you should see 4)\n7. **Bonus:** delete the `snape` branch (poor Snape)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeachtj%2Fbranchingexercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeachtj%2Fbranchingexercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeachtj%2Fbranchingexercise/lists"}