{"id":21058276,"url":"https://github.com/bluefrog130/git","last_synced_at":"2026-02-03T14:31:33.165Z","repository":{"id":101936546,"uuid":"333104611","full_name":"BlueFrog130/git","owner":"BlueFrog130","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-26T16:43:21.000Z","size":72,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-26T22:05:48.549Z","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/BlueFrog130.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":"2021-01-26T14:08:45.000Z","updated_at":"2021-01-28T14:08:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e8f0674-47d6-4cf0-aeda-b0973255c39b","html_url":"https://github.com/BlueFrog130/git","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlueFrog130/git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueFrog130%2Fgit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueFrog130%2Fgit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueFrog130%2Fgit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueFrog130%2Fgit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueFrog130","download_url":"https://codeload.github.com/BlueFrog130/git/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueFrog130%2Fgit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":"2024-11-19T17:07:21.319Z","updated_at":"2026-02-03T14:31:33.146Z","avatar_url":"https://github.com/BlueFrog130.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Tutorial\n\n- [Git Download](https://git-scm.com/downloads)\n- [Visual Studio Code](https://code.visualstudio.com/) - My preferred IDE for any programming language with git integrated\n\n## Getting Started\n\n0. Ensure you are in a new, clean directory with a `README.md` file\n\n1. Create repo\n    ```bash\n    git init\n    ```\n2. Set branch name to \"master\" or whatever branch name you want\n    ```bash\n    git branch -m master\n    ```\n3. Set origin to GitHub repository. Where `\u003curl\u003e` is the URL of your git repository.\n    ```bash\n    git remote add origin \u003curl\u003e\n    ```\n4. Add files to commit\n    ```bash\n    git add .\n    ```\n5. Commit the files\n    ```bash\n    git commit -m \"init\"\n    ```\n6. Intial push. Ensure you are pushing to the name you gave to remote and the branch name you set. In this example the remote name is \"origin\" and the branch name is \"master\"\n    ```bash\n    git push -u origin master\n    ```\n\n## Workflow\n\nThe philosiphy of git is to seperate your code changes into small, readable commits. You may stack up as many commits locally as you like, and push them when you are ready.\n\n### Typical Workflow\n\n1. Make some changes to code/files\n2. Add them. You can do `git add \u003cfile\u003e` individually instead.\n    ```bash\n    git add . \n    ```\n3. Commit you changes and annotate what you changed\n    ```bash\n    git commit -m \"\u003cDESCRIBE YOUR CHANGES\u003e\"\n    ```\n4. Repeat steps 1 - 3 until you want to update remote repository\n5. Push commits. If you are pushing a branch that does not exist remotely, you will need to `git push -u origin \u003cbranch\u003e`\n    ```bash\n    git push\n    ```\n\n## Common Git commands\n\n### Initializes repository\n```bash\ngit init\n```\n\n\u003cbr/\u003e\n\n### Clones repository into a folder\n```bash\ngit clone \u003curl\u003e\n```\n\n\u003cbr/\u003e\n\n### Pull latest commits from repository\n```bash\ngit pull # -r\n```\n#### Most Used Options\n- `-r` rebase all local commits on top commits pulled from repo\n\n\u003cbr/\u003e\n\n### Push all local commits to the remote repository\n```bash\ngit push\n```\n#### Most Used Options\n- `--set-upstream origin \u003cbranch\u003e`/`-u origin \u003cbranch\u003e` Pushes branch to remote\n\n### Stage changes to be committed\n```bash\ngit add \u003cfiles\u003e\n```\n#### Most Used Options\n- `-a` will stage all files\n\n\u003cbr/\u003e\n\n### Commit all staged changes\nThis will open a text editor to briefly describe your changes.\n\n```bash\ngit commit\n```\n#### Most Used Options\n- `-m \"\u003cmessage\u003e\"` Passes message rather than opening a text editor\n- `--amend` Adds staged changes to the previous commit\n\n\u003cbr/\u003e\n\n### List all branches\n```bash\ngit branch \u003cname\u003e\n```\nIf you include a name, it will create a new branch with that name from your currently active branch.\n#### Most Used Options\n- `-a` Lists all local and remote branches\n- `-d \u003cbranch\u003e` Deletes a branch\n- `-m \u003cbranch\u003e` Renames a branch\n\n\u003cbr/\u003e\n\n### Switch to a branch\nShould commit all changes before checking out.\n\n```bash\ngit checkout \u003cbranch\u003e\n```\n#### Most Used Options\n- `-b` Creates and switches to a new branch\n\n\u003cbr/\u003e\n\n### Resets all commit to HEAD\n```bash\ngit reset\n```\n#### Most Used Options\n- `HEAD~1` Undos last commit\n- `--hard` Deletes all local changes\n\n### Log commits\n```bash\ngit log\n```\n#### Most Used Options\n- `--pretty=oneline` prints everything nicely in one line\n\n\u003cbr/\u003e\n\n---\n\n## Useful Aliases\n\nAliases are essentially custom git commands that are defined in `C:\\Users\\%USER%\\.gitconfig`\n\n```\n[alias]\n    co = checkout\n    lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)\u003c%an\u003e%Creset' --abbrev-commit\n    undo = reset HEAD~1 --mixed\n    amend = commit -a --amend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluefrog130%2Fgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluefrog130%2Fgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluefrog130%2Fgit/lists"}