This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Author: Maarten Nieber | |
# Url: https://gist.github.com/mnieber/ | |
import json | |
import subprocess | |
import sys | |
from argparse import ArgumentParser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# The purpose of this script is to use a "local" git-directory alongside | |
# a "main" git working directory, and keep the two in sync. The "local" directory | |
# is used for storing local files that are associated with the "main" files but cannot | |
# be stored in the "main" directory (for example, local editor config files). | |
# | |
# Synopsis: | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Usage: git pick sha branch-name --base[=origin/master] | |
# | |
# Picks a commit and puts it on a new branch that is based off "base". | |
# The following actions are taken: | |
# | |
# - check if branch-name does not already exist (abort if it does) | |
# - resolve "sha" to an absolute hash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Usage: git split [-ri] <sha> | |
# | |
# Creates a tag (the split-point) at the sha where your branch begins. | |
# Allows you to interactively rebase onto this tag. | |
# Allows you to rebase your branch onto some other sha, | |
# moving the split-point along. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Usage: git fixdown [-vfd] | |
# | |
# Finds all commits that are corrected by the staged changes. If there is only one | |
# such commit, makes a fixup commit targetting that commit. | |
# | |
# Note: place this script on the path, so git can find it, | |
# and make it executable (chmod +x git-fixdown). |