{"id":22173834,"url":"https://github.com/puneethkumarck/git-command-tips","last_synced_at":"2026-02-07T15:13:33.002Z","repository":{"id":129140468,"uuid":"115525577","full_name":"Puneethkumarck/git-command-tips","owner":"Puneethkumarck","description":"This project contains git command tips","archived":false,"fork":false,"pushed_at":"2018-07-01T08:21:41.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T18:14:13.081Z","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/Puneethkumarck.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":"2017-12-27T13:49:00.000Z","updated_at":"2024-12-26T23:08:23.000Z","dependencies_parsed_at":"2023-07-27T04:17:12.683Z","dependency_job_id":null,"html_url":"https://github.com/Puneethkumarck/git-command-tips","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Puneethkumarck/git-command-tips","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Puneethkumarck%2Fgit-command-tips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Puneethkumarck%2Fgit-command-tips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Puneethkumarck%2Fgit-command-tips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Puneethkumarck%2Fgit-command-tips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Puneethkumarck","download_url":"https://codeload.github.com/Puneethkumarck/git-command-tips/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Puneethkumarck%2Fgit-command-tips/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29197940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"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":"2024-12-02T07:35:45.389Z","updated_at":"2026-02-07T15:13:32.987Z","avatar_url":"https://github.com/Puneethkumarck.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-command-tips\nThis project contains git command tips\n\n### Create a new repository on the command line\n ```\ntouch README.md\ngit init\ngit add README.md\ngit commit -m \"first commit\"\ngit remote add origin  https://github.com/Puneethkumarck/spring-cloud-microservice-playground (eg remote git repo url)\ngit push -u origin master\n```\n \n### Push an existing repository from the command line\n \n ```\ngit remote add origin  https://github.com/Puneethkumarck/spring-cloud-microservice-playground (eg remotegit repo url)\ngit push -u origin master\n```\n\n### Issues \n\nfatal: refusing to merge unrelated histories\n\n```\ngit pull origin master --allow-unrelated-histories\n```\n\n### To remove git history from github\n\n```\nCheckout\n\ngit checkout --orphan latest_branch\n\nAdd all the files\n\ngit add -A\n\nCommit the changes\n\ngit commit -am \"commit message\"\n\nDelete the branch\n\ngit branch -D master\n\nRename the current branch to master\n\ngit branch -m master\n\nFinally, force update your repository\n\ngit push -f origin master\n```\n### specify author while commiting\n\n```\ngit commit --author 'username \u003cexample.com\u003e' -am \"commit message\"\n```\n\n### adding files to stage for commit\n\n```\ngit add -A stages All\n\ngit add . stages new and modified, without deleted\n\ngit add -u stages modified and deleted, without new\n```\n\n### Undo Commit and untrack the file\n```\nundo the latest commit\ngit reset --soft HEAD^1\n\nremove file from staging area\ngit rm --cached \u003cfile-name\u003e\n\n```\n### Using multiple git accounts\n## local config\n + git config user.name \"**************\"\n \n + git config user.email \"*************\" \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuneethkumarck%2Fgit-command-tips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuneethkumarck%2Fgit-command-tips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuneethkumarck%2Fgit-command-tips/lists"}