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
#!/bin/bash | |
# Rebase latest remote base branch when you are working on a feature branch | |
# + delete merged remote branches | |
# | |
# `git rbb` is a abbreviation of `git ReBase Base branch` :-) | |
# | |
# This will... | |
# 1. Commit current changes temporarily if there are uncommitted changes | |
# 2. Pull base branch with '--prune' option without checkout | |
# 3. Rebase develop |
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
#!/bin/bash | |
# This will find you the merge commit from a commit hash, and print the log of it. | |
# Use this when you want to know about the merged branch which includes that commit. | |
# | |
# 1. Move this file to ~/.gitsh/ | |
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file | |
# (like ~/.bash_profile or ~/.zshrc) | |
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh') | |
# 3. chmod 0755 git-findmerge | |
# 4. Use the command 'git findmerge COMMIT_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
set shortcut to "{query}" | |
if shortcut is equal to "d" then | |
set _path_ to "~/Desktop" | |
else if shortcut is equal to "gitsh" then | |
set _path_ to "~/.gitsh" | |
else | |
set _path_ to "~" | |
end if |
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
#!/bin/bash | |
# Rebase remote develop when you are working on a feature branch | |
# + delete merged remote/local branches | |
# | |
# `git rbd` is a abbreviation of `git rebase develop` :-) | |
# | |
# This will... | |
# 1. Commit current changes temporarily if there are uncommitted changes | |
# 2. Checkout current branch to develop | |
# 3. Pull remote develop with '--prune' option |
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
#!/bin/bash | |
# This runs interactive rebase with short command. | |
# It is equal to `git rebase -i HEAD~$OFFSET | |
# 1. Move this file to ~/.gitsh/ | |
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file | |
# (like ~/.bash_profile or ~/.zshrc) | |
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh') | |
# 3. chmod 0755 git-ri | |
# 4. Use the command 'git rih 4' |
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
#!/bin/bash | |
# This will forch push current branch to origin | |
# This is just a short version of devxoul's `git pushme` script | |
# https://gist.githubusercontent.com/devxoul/a972ba0db2a25b989887/raw/f62353501becb274eb63c76b83fbcc01250a 286d/git-pushme | |
# | |
# 1. Move this file to ~/.gitsh/ | |
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file | |
# (like ~/.bash_profile or ~/.zshrc) | |
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh') | |
# 3. chmod 0755 git-pmf |
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
#!/bin/bash | |
# This runs interactive rebase with autosquash in short command. | |
# It is equal to `git rebase -i COMMIT_HASH~1` | |
# 1. Move this file to ~/.gitsh/ | |
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file | |
# (like ~/.bash_profile or ~/.zshrc) | |
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh') | |
# 3. chmod 0755 git-ri | |
# 4. Use the command 'git ri COMMIT_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
#!/bin/bash | |
# This will push current branch to origin and open a 'Create a pull request' page for Github. | |
# | |
# 1. Move this file to ~/.gitsh/ | |
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file | |
# (like ~/.bash_profile or ~/.zshrc) | |
# 3. chmod 0755 git-pr | |
# 4. Use the command 'git pr' | |
BRANCH=$(git branch --list | awk '{ if ($1 == "*") print $2 }'d) |
NewerOlder