{"id":21725784,"url":"https://github.com/dunghenry/git_github","last_synced_at":"2026-05-10T14:43:16.583Z","repository":{"id":107272153,"uuid":"528519028","full_name":"dunghenry/git_github","owner":"dunghenry","description":"learn git + github","archived":false,"fork":false,"pushed_at":"2022-11-10T15:15:34.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T19:29:17.922Z","etag":null,"topics":["git","github"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dunghenry.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":"2022-08-24T17:07:19.000Z","updated_at":"2022-08-24T18:55:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"d37fb288-d984-4894-8223-299d1b980af9","html_url":"https://github.com/dunghenry/git_github","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunghenry%2Fgit_github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunghenry%2Fgit_github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunghenry%2Fgit_github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunghenry%2Fgit_github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dunghenry","download_url":"https://codeload.github.com/dunghenry/git_github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244706521,"owners_count":20496570,"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","github"],"created_at":"2024-11-26T03:19:59.370Z","updated_at":"2026-05-10T14:43:11.561Z","avatar_url":"https://github.com/dunghenry.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Git vs GitHub\n\n### Create repository\n\n```\ngit init\n```\n\n### Create file README.md\n\n```\ngit add README.md\n```\n\n### Create commit\n\n```\ngit commit -m \"first commit\"\n```\n\n### Create branch\n\n```\ngit branch -M main\n```\n\n### Managing remote repositories\n\n```\ngit remote add origin https://github.com/username/repository_name.git\n```\n\n### Pushing to branch\n\n```\ngit push -u origin main\n```\n\n### Unstage\n\n```js\ngit rm --cached filename.js\n```\n\n### Stage\n\n```js\ngit add .\n```\n\n```js\ngit add filename.js\n```\n\n### Add staging and commit\n\n```js\ngit commit -a -m\"message\"\n```\n\n### Change commit\n\n```js\ngit commit --amend\n```\n\n### Exit git log\n\n```js\nq;\n```\n\n### Override commit\n\n```js\ngit push --force\n```\n\n### Log\n\n```js\ngit log --oneline\n```\n\n### List branch\n\n```js\ngit branch\n```\n\n### Create new branch\n\n```js\ngit branch branchname\n```\n\n### Checkout branch\n\n```js\ngit checkout branchname\n```\n\n### Create new branch from branch a\n\n```js\ngit branch b a\n```\n\n### Create new branch and checkout\n\n```js\ngit checkout -b branchname\n```\n\n### Merge branch to branch master\n\n```js\ngit checkout master\ngit merge branchname\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunghenry%2Fgit_github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdunghenry%2Fgit_github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunghenry%2Fgit_github/lists"}