GithubHelp home page GithubHelp logo

git-tools's Introduction

git-tools

This is a collection of useful tools for Git.

join-git-repos

The purpose of join-git-repos is to combine several Git repositories into a single repository. It will do the following:

  • Import the complete history (including tags and branches) of two or more repositories into a new, single repository.
  • Move each source repository into a dedicated sub-folder in the new repository, for all commits in the history (this guarantees that there are no merge conflicts).
  • Stitch the histories of the main branches (e.g. master) of all source repositories, in commit date order, while preserving branch and merge points (this makes it possible to check out an old commit and the result should be a reasonable representation of all the source repositories at the given time in history).
  • Rename all the refs (branches and tags) in all source repositories except the first (main) repository. For instance, when joining the repositories foo and bar, there will be two branches called master and master-bar in the resulting repository. This minimizes the risk of name collisions.

git-filter-blobs

This tool allows you to modify blobs (file content) for all versions of all files in a repository. The result is written to a new repository that is a complete clone of the source repository (except that file content may have changed).

For example, to run clang-format on all C/C++ files in the history (making it appear as if the files have been correctly formatted from the beginning), you can run:

git-filter-blobs.py -f h,hpp,c,cpp path/to/old-repo path/to/new-repo 'clang-format -style="{BasedOnStyle: Chromium, ColumnLimit: 100}"'

Note that if the command string includes %f, it will be expanded to the filename of the blob that is being processed. That can be useful for creating more advanced file filters (e.g. to filter based on the folder in which the file is located), or to select different tools for different file types, for instance.

make-submodule-repo

make-submodule-repo will create a new (local) repository with one or more submodules. The history of the new repoistory will contain one commit (updating the respective submodule SHA) for each commit in the master branch of the respective source repository.

This can be useful, for instance, for creating a repository for third party dependencies that is to be included in a bigger repo using join-git-repos.

git-tools's People

Contributors

mbitsnbites avatar ngbrown avatar tginiotis-at-work avatar tobiasfaller avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.