Giter Site home page Giter Site logo

gitutils's Introduction

gitutils

submodule-hooks

  • pre-commit -- Check whether any submodule is about to be updated with the commit. Ask the user for confirmation. To use, copy to $GIT_DIR/hooks/ and make it executable.

  • post-merge-checkout -- Check if any submodule has been updated post git-merge (git-pull) or a branch checkout. If so, ask if user wants to run git-submodule update. To use, copy to $GIT_DIR/hooks/post-checkout and/or $GIT_DIR/hooks/post-merge and make them executable.

There's an install script inside the submodule-hooks directory (install.sh); you can use this script to install submodule-hooks in your git working directory.

git-track-remote

Sets up an existing branch to track a remote branch.

Usage:

git track-remote origin/branch
git track-remote branch origin/branch

Runs the following git-config commands:

git config branch.$local_branch.remote $remote_repo
git config branch.$local_branch.remote refs/heads/$remote_branch

git-new

git-new will display a (git) log of all commits which are in the remote tracking branch but not in the local branch. All options are passed to git-log. Most useful after a git fetch.

Usage:

git new
git new --oneline
git new -p

Note: You need to add this file and ./new-revs to your $PATH for it to work.

to-utf8

to-utf8 tries to detect the encoding of the given file using file and then prints its contents to stdout, converted to utf-8. The command iconv is required to perform the conversion to utf-8.

to-utf8 is useful as a git-diff driver for text files not encoded using ascii or utf-8. To configure this as a diff driver,

  1. Add to-utf8 to your $PATH

  2. Configure it as diff driver in your git config using:

     git config diff.to-utf8.textconv to-utf8
    
  3. In your project's .gitattribues, configure the relevant path to use this diff driver. e.g.

     *.strings diff=to-utf8    /* Cocoa Strings files */
    

gitutils's People

Contributors

chaitanyagupta avatar bcotton avatar taher avatar

Watchers

James Cloos 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.