A set of powertools for git.
- Git setup -- initialize a repository with remote.
- Git collapse -- collapses all the history from the master branch.
- Git clone-all -- clones all repositories of a given user.
- Links to additional awesome git tools.
Git setup initializes a local git repository and pushes it to a remote git.
Download git-setup and make it executable by running:
$ chmod u+x git-setup
To setup a repository, run from within the repository to setup:
$ Run git setup REMOTE_REPOSITORY
Example of REMOTE_REPOSITORY: git@github.com:user/repository-name.git
Git setup configures and commits the repository with message initial commit
.
Subsequent commits to the remote repository can be pushed with git push
.
Git collapse discards all the history from the master
branch.
Download git-collapse and make it executable by running:
$ chmod u+x git-collapse
To rollup a repository, run from within the repository to rollup:
$ Run git collapse COMMIT_MESSAGE
Git collapse commits the repository files to recreate the master
branch with only the latest versions, as if it was a brand new repository. Git collapse does not delete or affect other branches (besides latest_branch
which is used to recreate the master
branch).
-
No Undo: Git collapse cannot be undone!
-
Broken Forks: All forks of the repository will stop working after git collapse!
Git collapse creates a new temporary branch (latest_branch), and commits the latest revision of all files from the master branch to latest_branch.
Then it deletes the master branch, makes latest-branch the master branch. Finally, git collapse forces a push to origin.
Git clone-all creates a local copy of all public Github repositories of a given user.
Download git-clone-all and make it executable by running:
$ chmod u+x git-clone-all
To clone all public repositories of a given user:
-
Find the Github USERID of the user. The USERID appears immediately after github.com/. For my account, the USERID is macp3o.
-
Run:
$ git clone-all USERID [DIRECTORY]
Or, move to the target directory and omit DIRECTORY in the command above.
Requires bash, curl, sed, and obviously git.
Additional wonderful git tools are available from:
- TJ's Git Extras, and
- Steve Mao's Awesome Git Addons curated list of git addons.
Git Powertools is open-source software released under the MIT license. See the LICENSE file for details.