Awesome Git Add-ons

repository·master·Indexed 24 days ago

https://github.com/stevemao/awesome-git-addons

A curated collection of Git add-ons and CLI extensions designed to enhance the standard Git experience. Includes tools for repository management and statistics (git-extras), workflow management (gitflow AVH Edition, Git Town, legit), GitHub integration (hub), large file storage (git-lfs), and specialized utilities for issue tracking (git-issue), deployment (git-deploy), and iterative merging (git-imerge).

Tokens
4.4K
Snippets
17
Records
32
Agent score
31%

What's inside awesome-git-addons

  1. Overview of Awesome Git Add-ons

    master

    This repository is a curated list of add-ons designed to extend and enhance the standard Git CLI. These tools provide additional commands and functionality to streamline Git workflows.

    Note: Some commands may require manual configuration of aliases or the execution of post-install scripts to function correctly after installation.

  2. Deploy applications with git-deploy

    master

    git-deploy allows you to deploy your code to remote servers via Git. You can set up a production remote and push your branches directly to the server to trigger deployments.

    $ git remote add production "user@example.com:/apps/mynewapp"
    $ git deploy setup -r "production"
    $ git deploy init
    $ git push production master
  3. Use hub to extend Git with GitHub-specific workflows

    master

    hub is a GitHub CLI that extends Git commands to interact directly with GitHub features like pull requests, forks, and repository creation. It allows you to perform actions like git clone, git pull-request, and git fork using GitHub URLs or shorthand.

    Common tasks include:

    • Cloning: Use git clone <user>/<repo> to clone via HTTPS or git clone -p <user>/<repo> for SSH.
    • Pull Requests: Use git pull-request to open a text editor for the title and body, or git merge <url> to merge a remote pull request.
    • Repository Management: Use git fork to fork a repo on GitHub, git create to create a new repo on GitHub, and git browse to open the current repo in a browser.
    • Workflow: Use git push <remote>,<other_remote> <branch> to push to multiple remotes simultaneously.
  4. Manage git user profiles with git-user

    master

    The git-user tool allows you to manage multiple identity profiles (e.g., 'work' and 'home') and switch between them for specific repositories.

    # add a work profile for Henry
    $ git user add work "Dr. Henry Jekyll" henry@jekyll.com
    
    # add a personal profile for Edward
    $ git user add home "Edward Hyde" hyde@night.com
    
    # list out our saved profiles
    $ git user list
    
    # set the current git repository user to the home profile
    $ git user set home
    
    # check the current repository profile
    $ git user
  5. Automate complex workflows with Git Town

    master

    Git Town provides high-level commands to automate multi-step git operations:

    • git hack <branch>: Fetches, rebases, and checks out a branch in one step.
    • git sync: Performs a full sync (fetch, checkout main, rebase, checkout branch, merge, and push).
    • git new-pull-request: Prepares a branch for a pull request by syncing with main and merging.
    • git ship: Merges a feature branch into main via squash merge, pushes, and deletes the local feature branch.
  6. Manage issues as a Git repository with git-issue

    master

    git-issue allows you to manage project issues using a dedicated Git repository. This enables issues to be versioned, tagged, assigned, and synchronized across different hosts using standard Git commands.

    # Initialize an empty issues repository
    $ git issue init
    
    # Create a new issue (opens editor)
    $ git issue new
    
    # Create a new issue with a summary string
    $ git issue new -s 'New issue entered from the command line'
    
    # List issues (optionally filtered by tag)
    $ git issue list
    $ git issue list gui
    
    # Manage issue metadata
    $ git issue tag e6a9 urgent
    $ git issue tag -r e6a9 urgent
    $ git issue assign e6a9 joe@example.com
    $ git issue watcher e6a9 jane@example.com
    
    # View issue details and comments
    $ git issue show e6a95c9
    $ git issue show -c e6a95c9
    
    # Synchronize issues
    $ git issue push
    $ git issue pull
  7. Manage branch workflows with legit

    master

    The legit tool simplifies common git workflows like publishing, syncing, and switching branches while managing local/remote states.

    • git branches: Lists branches and indicates if they are (published) or (unpublished).
    • git sync: Pulls commits from the server, rebases your work, and pushes changes.
    • git switch <branch>: Switches branches while automatically stashing local changes to keep the working directory clean.
    • git publish: Publishes the current branch to the remote.
    • git unpublish <branch>: Unpublishes a specific branch.
    $ git branches
    $ git sync
    $ git switch master
    $ git publish
    $ git unpublish master
  8. Manage secrets in git with git-secret

    master

    The git-secret tool allows you to store sensitive files in a git repository by encrypting them. It uses GPG for encryption/decryption.

    • git secret init: Initializes the .gitsecret/ directory.
    • git secret tell <email>: Adds a person (via email) who is authorized to decrypt the secrets.
    • git secret add <file>: Adds a file to the list of secrets to be encrypted.
    • git secret list: Lists all files currently managed by git-secret.
    • git secret hide: Encrypts all managed files.
    • git secret reveal: Decrypts the files (requires a passphrase/GPG key).
    $ git secret init
    $ git secret tell my@email.com
    $ git secret add hideme.txt
    $ git secret list
    $ git secret hide
    $ git secret reveal
  9. Use gitflow (AVH Edition) for workflow management

    master

    The gitflow tool implements the Gitflow workflow, providing structured commands for managing features, releases, and hotfixes.

    Initialization

    Run git flow init to configure your repository. You will be prompted to define your production branch (e.g., master) and your integration/development branch (e.g., develop).

    Feature Management

    • git flow feature start <name>: Starts a new feature branch.
    • git flow feature finish <name>: Finishes a feature branch (merges it into the integration branch).
    • git flow feature delete <name>: Deletes a feature branch.
    • git flow feature publish <name>: Publishes a feature branch to the remote.
    • git flow feature pull remote <name>: Pulls a feature branch from the remote.

    Release Management

    • git flow release start <name>: Starts a new release cycle.
    • git flow release finish <name>: Finishes the release (merges into production and integration branches).
    • git flow release delete <name>: Deletes a release branch.

    Hotfix and Support

    • git flow hotfix start <name>: Starts a hotfix branch for urgent production fixes.
    • git flow hotfix finish <name>: Finishes the hotfix.
    • git flow support: Manages support branches.
    # Initialize gitflow
    $ git flow init
    
    # Start and finish a feature
    $ git flow feature start awesome-feature
    $ git flow feature finish awesome-feature
    
    # Start and finish a hotfix
    $ git flow hotfix start awesome-release
    $ git flow hotfix finish awesome-release
  10. Use git-extras for repository management and statistics

    master

    The git-extras package provides a wide array of commands for inspecting repository history, managing branches, and performing advanced Git operations.

    History and Statistics

    • git squash: Squash commits into a single commit. You can provide a commit message, a commit hash, or a range (e.g., HEAD~3).
    • git summary: Provides a high-level summary of the project (age, commits, files, and author distribution).
    • git line-summary: Shows a summary of lines and author contributions.
    • git effort: Displays a breakdown of commits and active days per file.
    • git authors: Lists the authors of the repository.
    • git changelog: Displays the commit history in a changelog format.
    • git commits-since: Shows commits since a specific time (e.g., yesterday).
    • git count: Returns the total number of commits.
    • git guilt: Shows who has been contributing most to specific files or ranges.
    • git local-commits: Lists local commits that haven't been pushed.

    Branch and Tag Management

    • git create-branch <name>: Creates a new branch and sets it up to track the remote.
    • git delete-branch <name>: Deletes a local and remote-tracking branch.
    • git delete-submodule <path>: Deletes a submodule.
    • git delete-tag <tag>: Deletes a specific tag.
    • git delete-merged-branches: Deletes branches that have already been merged.
    • git fresh-branch <name>: Creates a branch while removing common clutter files like .DS_Store or .gitignore from the working directory.
    • git merge-into <branch>: Merges the current branch into the specified branch.
    • git graft <branch>: Merges a branch and then deletes the source branch.

    File and Repository Utilities

    • git ignore <pattern>: Adds files or patterns to .gitignore.
    • git info: Displays a summary of remote URLs, branches (local and remote), the most recent commit, and Git configuration.
    • git fork <repo>: Forks a repository.
    • git release <version>: Releases a specific version (creates a tag and pushes to remote).
    • git setup: Initializes an empty Git repository.
    • git touch <file>: Creates a new file.
    • git obliterate <file>: Rewrites history to completely remove a file from all commits.
    • git archive-file: Creates a zip archive of the current branch.
    • git lock/unlock <file>: Locks or unlocks a file in the Git configuration.
    • git reset-file <file> <commit>: Resets a specific file to a specific commit.
    • git root: Shows the root directory of the repository.
    • git delta: Shows the differences in the repository.
    • git merge-repo <repo> <branch> <target>: Merges another repository into the current one.
    # Squash commits
    $ git squash fixed-cursor-styling "Fixed cursor styling"
    $ git squash 95b7c52
    $ git squash HEAD~3
    
    # Get repository summary
    $ git summary
    
    # Delete merged branches
    $ git delete-merged-branches
    
    # Remove a file from all history
    $ git obliterate secrets.json