-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from diogocavilha/fix-base-path
📝 Improve base path definitions
- Loading branch information
Showing
42 changed files
with
269 additions
and
206 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 03.13.2017 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 03.13.2017 | ||
# | ||
# ADDING FILES | ||
# | ||
# Adds files in order to commit and shows git status | ||
# git add | ||
|
||
git add $* && \ | ||
clear && \ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 03.13.2017 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 03.13.2017 | ||
# | ||
# ADDING ALL FILES | ||
# | ||
# Adds all files in order to commit and shows git status | ||
# git add --all | ||
|
||
git add --all && \ | ||
clear && \ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 03.16.2017 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 03.16.2017 | ||
# | ||
# CHECKOUT FILES | ||
# | ||
# Checkout files and shows git status | ||
# git checkout -- | ||
|
||
git checkout -- $* && \ | ||
clear && \ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 07.05.2016 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 07.05.2016 | ||
# | ||
# BRANCH CHACKOUT | ||
# | ||
# It forces the checkout of a branch | ||
# git checkout --track origin/<current_branch_name> | ||
|
||
branch_name=$1 | ||
branch_name="$1" | ||
git checkout --track origin/$branch_name |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 11.28.2017 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 11.28.2017 | ||
# | ||
# GIT DIFF | ||
# | ||
# Show changes of a file and suggests to add it | ||
# git diff | ||
|
||
clear | ||
|
||
if [ "$1" = "" ] | ||
then | ||
if [ "$1" = "" ]; then | ||
git diff | ||
return | ||
fi | ||
|
@@ -20,8 +17,7 @@ git diff "$1" | |
echo "" | ||
read -p " Add this file to commit? [y/N]: " r | ||
|
||
if [ "$r" = "y" ] | ||
then | ||
if [ "$r" = "y" ]; then | ||
git add "$1" | ||
fi | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 04.21.2018 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 04.21.2018 | ||
# | ||
# ADD, COMMIT, PUSH | ||
# | ||
# A shortcut for a common sequence in order to push changes | ||
# git add --all | ||
# git commit -m <message> | ||
# git push origin <current_branch_name> | ||
|
||
branch=$(git branch | grep -oP '(?<=\* ).*') | ||
msg=$1 | ||
branch_name=$(git branch | grep -oP '(?<=\* ).*') | ||
msg="$1" | ||
|
||
git add --all && \ | ||
git commit -m "$1" && \ | ||
git push origin $branch | ||
git commit -m "$msg" && \ | ||
git push origin $branch_name |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 09.01.2016 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 09.01.2016 | ||
# | ||
# GIT LOG | ||
# | ||
# Perform a pretty git log | ||
# It performs a pretty git log. | ||
|
||
logCmd="git log --date=short --pretty=format:'%C(bold yellow)%h%C(reset) %C(white)%ad %C(bold blue)(%ar)%C(reset) %C(bold green)%an %C(reset)%C(cyan)%s%C(reset)'" | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 04.01.2016 | ||
# | ||
# git pull | ||
|
||
. ~/.fancy-git/random_messages.sh | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 04.01.2016 | ||
# | ||
# git pull origin <branch_name> | ||
|
||
. ~/.fancy-git/random_messages.sh | ||
|
||
run() { | ||
local branch | ||
branch="$1" | ||
local branch_name | ||
branch_name="$1" | ||
|
||
git pull origin $branch | ||
git pull origin $branch_name | ||
|
||
_fancygit_after_pulling_random_message | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 04.01.2016 | ||
# | ||
# git pull origin <current_branch_name> | ||
|
||
. ~/.fancy-git/random_messages.sh | ||
|
||
run() { | ||
local branch | ||
branch=$(git branch | grep -oP '(?<=\* ).*') | ||
local branch_name | ||
branch_name=$(git branch | grep -oP '(?<=\* ).*') | ||
|
||
git pull origin $branch | ||
git pull origin $branch_name | ||
|
||
_fancygit_after_pulling_random_message | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 04.01.2016 | ||
# | ||
# git push origin <current_branch_name> | ||
|
||
branch=$(git branch | grep -oP '(?<=\* ).*') | ||
branch_name=$(git branch | grep -oP '(?<=\* ).*') | ||
|
||
git push origin $branch | ||
git push origin $branch_name |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 05.24.2016 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 05.24.2016 | ||
# | ||
# BRANCH RENAMING | ||
# It renames a branch locally. | ||
# | ||
# Rename branch locally | ||
# git branch -m <new_branch_name> | ||
|
||
new_branch_name=$1 | ||
new_branch_name="$1" | ||
|
||
git branch -m $new_branch_name |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 05.24.2016 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 05.24.2016 | ||
# | ||
# BRANCH RENAMING | ||
# Rename branch locally. | ||
# Delete the old branch. | ||
# Push the new branch, set local branch to track the new remote branch. | ||
# | ||
# Rename branch locally | ||
# Delete the old branch | ||
# Push the new branch, set local branch to track the new remote | ||
# git branch -m <new_branch_name> | ||
# git push origin :<old_branch_name> | ||
# git push origin <new_branch_name> | ||
|
||
new_branch_name=$1 | ||
new_branch_name="$1" | ||
old_branch_name=$(git branch | grep -oP '(?<=\* ).*') | ||
|
||
git branch -m $new_branch_name | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#!/bin/bash | ||
# | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 04.19.2018 | ||
# Author: Diogo Alexsander Cavilha <[email protected]> | ||
# Date: 04.19.2018 | ||
# | ||
# APPLY STASH | ||
# | ||
# It applies a stash | ||
# git stash apply stash@{<stash_id>} | ||
|
||
stash_id=$1 | ||
stash_id="$1" | ||
git stash apply stash@{$stash_id} |
Oops, something went wrong.