{"id":24508638,"url":"https://github.com/adygcode/git-command-help","last_synced_at":"2026-02-27T00:02:38.651Z","repository":{"id":112775389,"uuid":"394191861","full_name":"AdyGCode/git-command-help","owner":"AdyGCode","description":"Simple refresher of Git Commands","archived":false,"fork":false,"pushed_at":"2021-08-09T07:26:41.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T19:43:18.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AdyGCode.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":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-09T07:22:27.000Z","updated_at":"2021-08-09T07:36:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"a160cae0-a6f8-4fc5-812c-fd461d9185d1","html_url":"https://github.com/AdyGCode/git-command-help","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AdyGCode/git-command-help","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdyGCode%2Fgit-command-help","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdyGCode%2Fgit-command-help/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdyGCode%2Fgit-command-help/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdyGCode%2Fgit-command-help/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdyGCode","download_url":"https://codeload.github.com/AdyGCode/git-command-help/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdyGCode%2Fgit-command-help/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29878271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-01-22T00:17:18.515Z","updated_at":"2026-02-27T00:02:38.645Z","avatar_url":"https://github.com/AdyGCode.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Demo\n\nThis is a demo git repo with a list \nof commands as a cheat sheet.\n\n## Creating a Local Repo\n\n1) Change into the required folder:\n   PC:\n   ```bash\n   cd %HOME%\\Source\\Repos\n   ```\n   MAC:\n   ```bash\n   cd ~/Source/Repos\n   ```\n\n2) Create New Folder\n    ```bash\n   mkdir Project-Name\n   ```\n3) Change into the new folder\n   ```bash\n   cd Project-Name\n   ``` \n4) Initialise with Git\n```bash\n   git init\n```\n5) Change Master to Main (moves the branch to new name)\n```bash\ngit branch -m master main\n```\n6) Check the status\n```bash\n   git status\n```   \n7) Create a `.gitignore`\nMAC:\n```bash\n   touch .gitignore\n```\nPC:\n```bash\n   echo \"\" \u003e .gitignore\n```\n8) Add required \"ignores\" to the `.gitignore` file. Recommend that you use a known .gitignore \n   or head to [http://gitignore.io](http://gitignore.io)\n9) Check the status\n```bash\n   git status\n``` \n10) Add and Commit the ignore file to version control\n```bash\n   git add .gitignore\n   git commit -m \"Original Commit\"\n```\n11) Verify commit\n```bash\n   git status\n``` \nAside: we added a README.md (This file) at this point, and added it to Version Control.\n\n### Adding files to Tracking\n```bash\ngit add filename\ngit add foldername/*\ngit add -A\ngit add .\n```\n\n### Checking the Logs\n```bash\n   git log\n```\n\n### Create a Branch\n```bash\n   git branch Branch-Name\n```\n\n### Change Branches\n```bash\n   git checkout Branch-Name\n```\n\n### Merging changes from one branch into main\n```bash\n   git checkout main\n   git status\n   git merge Branch-Name-To-Bring-In\n   git status\n   git log\n```\n\n## Remote Repositories\nBefore you can use a remote repository (repo) you need to have created it on the remote system.\n\nWe will use GitHub for this purpose, other remote repositories that use Git are also valid.\n\n## Create a Remote Repo\n1) Head to https://github.com\n2) If you do not have an account, create a github account\n3) Create a new repo making sure that:\n   - Do not add a README.md\n   - Do not add a License\n   - Do not add a .gitignore\n   - In other words: Do not add anything to the **blank** repo.\n\n### Connecting a Remote Repo\n```bash\ngit remote add origin https://github.com/ACCOUNT_NAME/REPO_NAME.git\n```\norigin = alias for the remote\n\n### Pushing commits to the remote\n```bash\ngit push -u origin main\n```\n\n\n\n\n\n## Asides!\n\n### Markdown Table\n\n| Heading 1 | Heading 2 | Another Heading |\n|---|---|---|\n|Content for Cell| Another bit | Last bit |\n|Another row... | | |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadygcode%2Fgit-command-help","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadygcode%2Fgit-command-help","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadygcode%2Fgit-command-help/lists"}