{"id":21236798,"url":"https://github.com/dragonbe/git-training","last_synced_at":"2025-03-15T03:14:19.994Z","repository":{"id":138003615,"uuid":"85049444","full_name":"DragonBe/git-training","owner":"DragonBe","description":"Tutorial on using git","archived":false,"fork":false,"pushed_at":"2017-03-15T09:56:36.000Z","size":7,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T18:50:29.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"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/DragonBe.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-03-15T08:46:53.000Z","updated_at":"2020-10-28T20:43:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"44bd1805-dd84-4e50-b155-60884b318128","html_url":"https://github.com/DragonBe/git-training","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/DragonBe%2Fgit-training","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DragonBe%2Fgit-training/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DragonBe%2Fgit-training/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DragonBe%2Fgit-training/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DragonBe","download_url":"https://codeload.github.com/DragonBe/git-training/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243676775,"owners_count":20329434,"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":[],"created_at":"2024-11-21T00:14:00.932Z","updated_at":"2025-03-15T03:14:19.987Z","avatar_url":"https://github.com/DragonBe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git training - The basics\n\n## Creating a new branch\n\nGo to the repository\nFork the original repository\nGo to the fork in your own gitHub profile\nCopy the link of the fork\n\n```\ngit clone \u003clink of fork\u003e\ngit checkout -b \u003cBranchName\u003e\ngit add \u003cfilename\u003e\ngit commit -m \"Add comments of the changes\"\n```\n\nIn case of a merge conflict:\n(Make sure the upstream is correct) \n```\ngit remote add upstream \u003clink to the original repository\u003e\ngit checkout master\ngit pull upstream master\ngit checkout \u003cBranchName\u003e\ngit merge master\n```\n\nCompare the files and check for differences. Delete the HEAD and markers where necessary.\n\n```\ngit add \u003cfilename\u003e\ngit push origin \u003cBranchName\u003e\n```\n\n## How to change your bash profile:\n\nFirst dive into your directory and add following lines to `vi ~/.bash_profile`:\n```\nparse_git_branch() {\n     git branch 2\u003e /dev/null | sed -e '/^[^*]/d' -e 's/* \\(.*\\)/ (\\1)/'\n}\nexport PS1=\"\\u@\\h \\[\\033[32m\\]\\w\\[\\033[33m\\]\\$(parse_git_branch)\\[\\033[00m\\] $ \"\n```\n\nNext change your source with the following command `source ~/.bash_profile`\n\nNow you'll notice some beautiful colors are added in your terminal!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragonbe%2Fgit-training","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragonbe%2Fgit-training","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragonbe%2Fgit-training/lists"}