{"id":19934679,"url":"https://github.com/ak2k30/git-auto-wf-npm-package","last_synced_at":"2026-04-28T23:38:04.890Z","repository":{"id":233301025,"uuid":"786949596","full_name":"AK2k30/git-auto-wf-npm-package","owner":"AK2k30","description":"This is an npm package to auto git workflow for your project","archived":false,"fork":false,"pushed_at":"2024-06-19T21:07:04.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T02:50:10.842Z","etag":null,"topics":["github","nodejs","npm-package","project"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/git-auto-wf","language":"JavaScript","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/AK2k30.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,"zenodo":null}},"created_at":"2024-04-15T15:54:07.000Z","updated_at":"2024-07-25T11:52:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"642263f4-03cf-45e5-b9ef-191a24c13412","html_url":"https://github.com/AK2k30/git-auto-wf-npm-package","commit_stats":null,"previous_names":["ak2k30/git-auto-wf-npm-package"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AK2k30/git-auto-wf-npm-package","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK2k30%2Fgit-auto-wf-npm-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK2k30%2Fgit-auto-wf-npm-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK2k30%2Fgit-auto-wf-npm-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK2k30%2Fgit-auto-wf-npm-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AK2k30","download_url":"https://codeload.github.com/AK2k30/git-auto-wf-npm-package/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK2k30%2Fgit-auto-wf-npm-package/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32404340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: 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":["github","nodejs","npm-package","project"],"created_at":"2024-11-12T23:17:33.956Z","updated_at":"2026-04-28T23:38:04.876Z","avatar_url":"https://github.com/AK2k30.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/akashsunile"],"categories":[],"sub_categories":[],"readme":"# npm i git-auto-wf\n\n`git-auto-wf` is a Node.js CLI tool that automates Git workflows, making it easier to initialize repositories, commit changes, and manage remotes. It's ideal for developers who frequently start new projects or handle multiple repositories.\n\n# Get Started\n\n![Logo](https://github.com/AK2k30/github-workflow-automation-npm-package/assets/105514643/8e5c5b2b-f332-49bd-acab-eaa3c29e3611)\n\n\n## Installation\n\nInstall gitwf with npm\n\n```bash\n  npm install git-auto-wf\n```\n\n## Getting Started with `git-automate-wf`\n\nFollow these simple steps to automate your Git workflow efficiently:\n\n### Step 1: Update Package.json\nAfter installing `git-auto-wf`, add the following script to your `package.json`:\n```json\n\"scripts\": {\n  \"gitwf\": \"gitwf\"\n}\n\n```\n\n### Step 2: Configure Environment\nCreate a `.env` file in the root of your project and securely add your GitHub personal access token to manage GitHub operations without manual authentication each time:\n\n```plaintext\nSECRET_KEY=\"your_github_token_here\"\n```\n\n### Step 3: Run the command\nExecute the tool using npm by adding it to your command line. This script lets you manage your Git workflow directly:\n\n```plaintext\nnpm run gitwf\n```\n\n### Step 4: Authenticate with GitHub\nIf not already logged in, authenticate using the GitHub CLI:\n\n```plaintext\ngh auth login\n```\n\nIf you're not authenticated, the tool will prompt you to authenticate automatically.\n\n### Step 5: Repository Initialization and Management\nDuring the initial run, if a Git repository does not already exist in your project directory, git-automate-wf will prompt you to create one. \n\nFollow these steps to quickly set up your project with `git-auto-wf`:\n\n1. **Initialize a New Git Repository**\n   - This tool will automatically detect if a Git repository needs to be initialized and will set it up for you.\n\n2. **Automatically Add All Files**\n   - All new and untracked files will be automatically added to the staging area, ready for commit.\n\n3. **Create an Initial Commit**\n   - You will be prompted to enter a commit message for the initial commit, encapsulating all changes made.\n\n4. **Set Up a Remote Repository URL (if needed)**\n   - If you need to connect your local repository to a remote, `git-auto-wf` will prompt you to provide the remote repository URL and set it up.\n\nIf a repository is already present, the tool will skip to managing existing files and commits:\n\n```plaintext\nEnter commit message:\n```\n\n### Step 6: Subsequent Usage\nAfter completing the initial setup, using git-auto-wf becomes more streamlined. Just run:\n\n```plaintext\nnpm run gitwf\n```\n\nEach subsequent execution will assess the current state of the repository and automate tasks like staging changes, committing, and managing branches or remotes as configured.\n\n### Step 6: Integrating Changes with Git Pull\n`git-auto-wf` seamlessly handles updates from your remote repository to ensure that your local project is always up-to-date with the latest changes made by other contributors. This functionality is crucial for collaborative projects where multiple developers are making concurrent updates to the codebase.\n\nHow Git Pull Works in `git-auto-wf`\nWhenever you run the command:\n\n```plaintext\nnpm run gitwf\n```\nThe tool automatically checks for changes in the remote repository that are not present in your local branch. If changes are detected, `git-auto-wf` will:\n\n1. **Pull Remote Changes and Merge Locally:**\n   - The tool will attempt to git pull with rebase from the current branch's upstream branch.\n   - If successful, it will then try to push again.\n   - If the pull operation fails (e.g., due to a merge conflict), the user is asked if they want to retry or resolve manually.\n\n2. **Create a New Branch for Your Changes**\n   - If the direct merge is not desirable or feasible, the user can opt to create a new branch.\n   - The user is prompted to provide a name for the new branch.\n   - The changes will be committed to this new branch, which is then pushed to the remote repository.\n\n3. **Cancel and Resolve Manually**\n   - This option allows the user to handle the conflict manually.\n   - The operation is cancelled, and the user can manually pull changes, inspect the differences, and resolve conflicts as needed.\n\n### Note:\nRemember to secure your `.env` file and not to expose your `SECRET_KEY` in any publicly accessible or shared environments. This key should be kept confidential to protect your GitHub account and repositories.\n\n## Authors\n\n- [@AK2k30](https://www.github.com/AK2k30)\n## Conclusion\n\n#### If you like this package, show your support \u0026 love!\n\n[![buy me a coffee](https://res.cloudinary.com/customzone-app/image/upload/c_pad,w_200/v1712840190/bmc-button_wl78gx.png)](https://www.buymeacoffee.com/akashsunile)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fak2k30%2Fgit-auto-wf-npm-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fak2k30%2Fgit-auto-wf-npm-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fak2k30%2Fgit-auto-wf-npm-package/lists"}