{"id":22662784,"url":"https://github.com/babupriyavrat/git_auto","last_synced_at":"2026-04-30T01:40:43.771Z","repository":{"id":264479133,"uuid":"893415426","full_name":"babupriyavrat/git_auto","owner":"babupriyavrat","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-31T11:19:38.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T23:37:05.494Z","etag":null,"topics":["beginner-friendly","easy","git","push","relax"],"latest_commit_sha":null,"homepage":"https://babupriyavrat.com","language":"Shell","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/babupriyavrat.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":"2024-11-24T11:49:09.000Z","updated_at":"2024-12-31T11:19:41.000Z","dependencies_parsed_at":"2025-02-03T23:36:16.812Z","dependency_job_id":"a4539993-7ec6-4dc8-b82e-147c35ce4b09","html_url":"https://github.com/babupriyavrat/git_auto","commit_stats":null,"previous_names":["babupriyavrat/git_auto"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babupriyavrat%2Fgit_auto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babupriyavrat%2Fgit_auto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babupriyavrat%2Fgit_auto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babupriyavrat%2Fgit_auto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babupriyavrat","download_url":"https://codeload.github.com/babupriyavrat/git_auto/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246162155,"owners_count":20733357,"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":["beginner-friendly","easy","git","push","relax"],"created_at":"2024-12-09T12:15:30.984Z","updated_at":"2026-04-30T01:40:38.727Z","avatar_url":"https://github.com/babupriyavrat.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Here's the complete `README.md` file with all the instructions and details:\n\n# Repository Initialization Script\n\nThis script automates the process of initializing a Git repository, creating a `.gitignore` file from a template, adding files to the repository, and pushing them to a remote GitHub repository. It also handles large files using Git LFS and allows users to skip specific folders during the `git add` process.\n\n## Functionalities\n\n1. **Initialize Git Repository**: Initializes a new Git repository if it doesn't already exist.\n2. **Create `.gitignore` File**: Creates a `.gitignore` file from a `.gitignore_template` file located in the current directory.\n3. **Skip Specified Folders**: Allows users to skip specific folders during the `git add` process.\n4. **Handle Large Files**: Checks for files larger than 100 MB and prompts the user to use Git LFS to track them.\n5. **Branch Management**: Handles branch creation and switching based on user input.\n6. **Push to Remote Repository**: Pushes the committed files to a remote GitHub repository.\n\n## Scenarios\n\n1. **New Repository**: The script creates a new private repository on GitHub if it doesn't already exist.\n2. **Existing Repository**: The script pulls the latest changes from the remote repository if it already exists.\n3. **Large Files**: The script prompts the user to use Git LFS for files larger than 100 MB.\n4. **Skipping Folders**: The script allows users to skip specific folders during the `git add` process.\n\n## Installation Instructions\n\n1. **Clone the Repository**: Clone the repository containing the script to your local machine.\n   ```bash\n   git clone https://github.com/yourusername/yourrepository.git\n   ```\n\n2. **Navigate to the Script Directory**: Change to the directory containing the script.\n   ```bash\n   cd yourrepository\n3.**Add environment variable**\n   You can create the PAT KEY from Github account \u003e Settings \u003e DeveLoper Settings \u003e Personal Access Tokens.\n   Take the Personal Access tokens and store in environment variable GIT_PAT_KEY.IF you Personal Access Tokens expire, you have to reset the environment variable.\n\n4. **Ensure `.gitignore_template` Exists**: Make sure there is a `.gitignore_template` file in the current directory. This file should contain the patterns for files and folders to be ignored by Git.\n\n5. **Run the Script**: Execute the script.\n   ```bash\n   ./git_init.sh  # for simple features (1,2 and 6)\n   ./git_comprehensive_init.sh # for all features\n   ```\n\n## Usage Instructions\n\n1. **Enter the Full Path of the Repository**: When prompted, enter the full path of the repository you want to initialize.\n   ```bash\n   Enter the full path of the repository: /path/to/your/repository\n   ```\n\n2. **Select Folders to Skip**: The script will list the folders and their sizes. Enter the numbers of the folders you want to skip, separated by commas.\n   ```bash\n   Enter the numbers of folders to skip (comma-separated): 0,2,4\n   ```\n\n3. **Enter Branch Name**: Enter the name of the branch you want to create or switch to.\n   ```bash\n   Enter the branch name: main\n   ```\n\n4. **Enter Commit Message**: Enter the commit message for the changes.\n   ```bash\n   Enter the commit message: \"Initial commit\"\n   ```\n\n5. **Handle Large Files**: If the script encounters a file larger than 100 MB, it will prompt you to use Git LFS to track the file.\n   ```bash\n   /path/to/large/file is larger than 100 MB. Do you want to use Git LFS to track this file? (y/n): y\n   ```\n\n6. **Push to Remote Repository**: The script will push the committed files to the remote GitHub repository.\n\n## Requirements\n\n- Git\n- Git LFS (for handling large files)\n\n## Notes\n\n- Ensure you have the necessary permissions to create repositories on GitHub.\n- Make sure your GitHub personal access token (PAT) has the required scopes (e.g., `repo`) to create and push to repositories.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n```\n\nFeel free to customize the `README.md` file as needed. Let me know if you need any further assistance!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabupriyavrat%2Fgit_auto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabupriyavrat%2Fgit_auto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabupriyavrat%2Fgit_auto/lists"}