Git Product home page Git Product logo

useful-scripts's Introduction

useful-scripts

Some useful scripts.

Git

Local update multiple repositories from list. List example is here.

Usage:

bash git/pull.sh bash/list_example.txt

Script for pushing git repository to all it's remotes. If it's called without arguments it pushes current folder. Else it parses filelist like pull script. List example is here.

Usage:

bash git/push.sh bash/list_example.txt
# or
bash git/push.sh

Change the author and committer name and e-mail of multiple commits for all branches and tags (original here - https://stackoverflow.com/a/750182). You should run this script from folder with repository to change.

WARNING! These changes are dangerous because they change git history!

Usage:

# Run this script from folder with repository to change.
bash git/change_author.sh WRONG_EMAIL CORRECT_NAME CORRECT_EMAIL

Bash

Copy folder via ssh using tar to current folder. It can be useful for copying folder with large amount of files via ssh. It's faster than pure ssh.

Usage:

bash bash/ssh_tar.sh user@host /path/to/folder
# or 
bash bash/ssh_tar.sh user@host -p port /path/to/folder

Parse filelist, call command $2 for each folder from filelist $1 and print text $3 for each folder. List example is here.

Usage:

# to show all directories in file bash/list_example.txt
bash/parse_filelist.sh bash/list_example.txt pwd "Current directory"

Call word count util (wc) for files in directory $1 with extensions $2, $3, $n etc.

Usage:

# For example to call wc for C and C++ files and headers (files *.c, *.cpp, *.cxx, *.h, *.hpp, *.hxx) run:
bash/wc.sh . c cpp cxx h hpp hxx

useful-scripts's People

Contributors

qiray avatar

Watchers

 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.