{"id":31549904,"url":"https://github.com/vrnvu/git-playground","last_synced_at":"2025-10-04T17:28:53.074Z","repository":{"id":154998039,"uuid":"402688496","full_name":"vrnvu/git-playground","owner":"vrnvu","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-13T10:29:38.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T22:24:53.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/vrnvu.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-09-03T07:44:34.000Z","updated_at":"2021-09-13T10:29:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0b9cea5-6816-4818-90f2-3c631c7af7d2","html_url":"https://github.com/vrnvu/git-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vrnvu/git-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrnvu%2Fgit-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrnvu%2Fgit-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrnvu%2Fgit-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrnvu%2Fgit-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrnvu","download_url":"https://codeload.github.com/vrnvu/git-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrnvu%2Fgit-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278345100,"owners_count":25971861,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-04T17:28:51.977Z","updated_at":"2025-10-04T17:28:53.030Z","avatar_url":"https://github.com/vrnvu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flow\n\nhello, fpero \n\ntoday we are going to learn how to use git and github\n\n- hello, sounds cool but i already kno... \n\nshh dont worry buddy lets start\n\n## fork\n\ngo to any github repo (we assume in this post everything is there, but this content works with anything but gerrit and such) and fork it\n\n- how i do that?\n\n[im not rewritting the getting started for you or translating it to spanish to sell it to my viewers for 9.99$](https://docs.github.com/es/get-started/quickstart)\n\njust google before asking\n\n- ok sorry \n  \n## clone fork to local \n\nclone your fork\n\nconfigure local envs if needed, some projects require this to build and test\n\nfor example, to contribute to k8s I have to set up my working_dir\n```bash\nexport working_dir=\"$(go env GOPATH)/src/k8s.io\"\n```\n\n- what is a local env? what is the export? you are going to fast\n\n...\n\nadd remote upstream\n\n```bash\ngit remote add upstream https://github.com/org/project.git\n```\n\ngood practice, never push to upstream master\n\n```bash\ngit remote set-url --push upstream no_push\n```\n\nok you may think that you are set up, you are not run the verification tests and check that everything actually works, there is probably some script in a /hack or /make folder\n\n## sync with upstream and origin\n\nalways rebase, either set your .gitconfig to flag pull --rebase true or do it manually\n\nin most projects, merging is not allowed and the CI bot will complain and stop the pipelines from running\n\ni'll be nice and add some references for my fellow fperos:\n\n- [pull --rebase vs --merge](https://sdqweb.ipd.kit.edu/wiki/Git_pull_--rebase_vs._--merge)\n- [merge vs rebase](https://mislav.net/2013/02/merge-vs-rebase/)\n\nhow does it look like in action?\n\n```bash\ngit fetch XXXX\ngit checkout master\ngit rebase XXXX/master\n```\n\nwhere XXXX can be upstream or origin\n\nquestion for the reader, where does the pull command by default pull from? \n\n```bash\ngit pull --rebase\n```\n\n- i don't know\n\nhuh\n\n- i did not understand the XXXX, too difficult  \n\nok, let me give you a detailed example\n\ni'm contributing to kubernetes and want to fetch and rebase \n```bash\ngit fetch upstream\ngit checkout master\ngit rebase upstream/master\n```\n\ni'm contributing to kubernetes in my fork with a collegue, author note do not do this pls, and I want to sync his changes in my branch\n```bash\ngit fetch origin\ngit checkout master\ngit rebase origin/master\n```\n\n- ok I understand now so easy\n\n## branches\n\nsync and branch from master 99% of the time \n\n```bash\ngit checkout -b foo\n```\n\nand push it\n\n```bash\ngit push --set-upstream origin foo\n```\n\ngo to github and create a pull request / merge request\n\ndo bot stuff if needed if contributing to some open source\n\nbefore submitting a pull request run local tests and checks\n\n## work\n\nyou need to know commiting, amending, rebasing, bisecting, cherry picking and reverting \n\nyou will be happy to know how to use worktrees (bare git) if it makes sense for your workflow honestly i see people constantly messing things up because they do not know how git works lol\n\n## extra\n\nif you want to learn more check [k8s contributors guide](https://github.com/kubernetes/community/tree/master/contributors/guide)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrnvu%2Fgit-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrnvu%2Fgit-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrnvu%2Fgit-playground/lists"}