{"id":19407925,"url":"https://github.com/codedrinker/git-local-default","last_synced_at":"2026-03-03T10:32:56.655Z","repository":{"id":26598685,"uuid":"30053564","full_name":"codedrinker/git-local-default","owner":"codedrinker","description":"continue learning some commands about git ","archived":false,"fork":false,"pushed_at":"2016-12-18T11:06:03.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T01:52:28.891Z","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/codedrinker.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}},"created_at":"2015-01-30T03:06:45.000Z","updated_at":"2017-07-28T06:46:49.000Z","dependencies_parsed_at":"2022-09-01T19:22:24.118Z","dependency_job_id":null,"html_url":"https://github.com/codedrinker/git-local-default","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codedrinker/git-local-default","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fgit-local-default","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fgit-local-default/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fgit-local-default/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fgit-local-default/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codedrinker","download_url":"https://codeload.github.com/codedrinker/git-local-default/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codedrinker%2Fgit-local-default/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30041287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T10:28:37.494Z","status":"ssl_error","status_checked_at":"2026-03-03T10:28:28.686Z","response_time":61,"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-10T12:04:35.398Z","updated_at":"2026-03-03T10:32:56.635Z","avatar_url":"https://github.com/codedrinker.png","language":null,"readme":"# git-continue-learning\n  continue learning some commands about git\n\n# 撤销一次提交\n  撤销一次提交可以用这种方式但是，但是得确保你提交了以后没有没有再次提交\n\n  git reset --hard HEAD~1 //仅还原一次提交\n\n  git push --force //像坦克一样，把其他的提交都给弄掉\n\n\n#撤销中间的提交\n  如果推送到远程了，其他人也提交了，那么这时候我们就不能按照上面的方法了，我们需要用如下命令\n\n  git rebase -i 2a9442^ //2a9442就是想删除的远程提交\n\n  我们会看到有好几个pick出来的，把最上面的直接删除就好了\n\n  pick 2a9442 //删除这行\n\n  pick ds98dhj278\n\n  ...\n\n  然后git push -f //像推土机一样强制push到远程\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedrinker%2Fgit-local-default","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodedrinker%2Fgit-local-default","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodedrinker%2Fgit-local-default/lists"}