{"id":16903236,"url":"https://github.com/dpup/git-workflow","last_synced_at":"2025-03-17T06:32:09.728Z","repository":{"id":43113925,"uuid":"92322527","full_name":"dpup/git-workflow","owner":"dpup","description":"Opinionated tools for managing a team based git workflow","archived":false,"fork":false,"pushed_at":"2021-11-29T20:01:39.000Z","size":42,"stargazers_count":93,"open_issues_count":2,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-27T19:29:18.574Z","etag":null,"topics":["command-line","git","github"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-24T18:11:54.000Z","updated_at":"2024-12-25T12:33:28.000Z","dependencies_parsed_at":"2022-09-22T06:11:16.973Z","dependency_job_id":null,"html_url":"https://github.com/dpup/git-workflow","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/dpup%2Fgit-workflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpup%2Fgit-workflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpup%2Fgit-workflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpup%2Fgit-workflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpup","download_url":"https://codeload.github.com/dpup/git-workflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847061,"owners_count":20357317,"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":["command-line","git","github"],"created_at":"2024-10-13T18:12:00.098Z","updated_at":"2025-03-17T06:32:06.649Z","avatar_url":"https://github.com/dpup.png","language":"Python","readme":"# git-workflow\n\n_Opinionated tools for managing a team based git workflow._\n\n\n## Principles\n\n- Respects the name of the default branch at origin, whether it's called `main` or `master`. We use `main` throughout this README\n- Local `main` is kept clean and relatively up to date with origin\n- Avoid merge commits where possible\n- Most work occurs in personal branches and are considered private (hence `push -f` is acceptable)\n\n## Prequisites\n\nHave Python 2.7 or Python 3.6.\n\nInstall requirements:\n\n`pip install -r requirements.txt`\n\nAdd this folder to your path, so `git` can pick up the scripts.\n\n\n## Commands\n\n### Start\n\n**Pulls main and creates a new feature branch named `$USERNAME/feature`.**\n\n`git start [feature]`\n\n### Switch\n\n**Switches between feature branches.**\n\n`git switch [feature]`\n\nIf the feature branch named `$USERNAME/feature` isn't found, the command tries\nout the name verbatim. This means it can also be used with non-feature branches\n(such as `main`).\n\n### Sync\n\n**Pulls main and rebases working branch.**\n\n`git sync [-i]`\n\nThis is useful to avoid your changes being interleaved with other commits.\nFor example, say you were coding in your branch and made the changes `A, B, C`.\nIf you merge with main the commit history may now be `W, A, X, Y, B, Z, C`.\nLeaving the history like this can make it harder to rollback a logical set of\nchanges in one go.  Using rebase, you will replay your commits on the end of\nmain, resulting in `W, X, Y, Z, A, B, C`.\n\nOften it makes sense to make a lot of changes locally, that you wouldn't\nnecessarily want to push together, in cases like this you can use\n`git sync -i` to interactively rebase your changes  and squash some commits.\nThis can result in a commit history showing `W, X, Y, Z, D`.\n\nMuch cleaner, right? But do be careful that you understand what is going on as\nrebase can both squash and remove commits.\n\n### Sync All\n\n**Pulls main and rebases all local branches.**\n\n`git sync-all`\n\n### Pull Request\n\n**Opens a GitHub pull request for the current branch**\n\n`git pull-request`\n\n#### Reviewer Aliases\n\nIf you frequently request review from the same handful of people, reviewer aliases\ncan reduce the amount to have to type/remember.\n\nAdd aliases with the `git config` CLI:\n\n```\n$ git config gitworkflow.alias.alice alice_has_a_long_git_handle\n$ git config gitworkflow.alias.bob hard2remember31415\n$ git config gitworkflow.alias.$ALIAS $GITHUB_HANDLE\n```\n\nWhen `git-workflow` asks you to specify reviewers, if you enter `alice`,\nthe PR will be sent to `alice_has_a_long_git_handle`.\n\n### Cleanup\n\n**Removes local and remote branches that have been merged into main.**\n\n`git cleanup`\n\n\n### GitHub Login\n\n**Requests GitHub credentials to be used by other scripts**\n\n`git github-login`\n\nPrompts for GitHub username/password and optional OTP password, then requests a\ngithub auth token. Credentials are stored in `~/.github-auth`.\n\n\n## License\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpup%2Fgit-workflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpup%2Fgit-workflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpup%2Fgit-workflow/lists"}