gdha / mismas Goto Github PK
View Code? Open in Web Editor NEWA hodgepodge collection of various Unix scripts
License: GNU Lesser General Public License v3.0
A hodgepodge collection of various Unix scripts
License: GNU Lesser General Public License v3.0
The 'Contributing' documentation on relax-and-recover.org
http://relax-and-recover.org/development/
reads
Merging the upstream/master with your local branch ...
...
# Checkout your local 'master' branch.
$ git checkout master
# Synchronize your local repository with 'upstream/master', so that you have all the latest changes.
$ git fetch upstream
but
https://github.com/gdha/mismas/blob/master/rebase_myfork_rear.sh
implements
echo "
Show current branch - should be master"
git branch
echo "
Fetch upstream
"
git fetch upstream
and no way for the user to intervene if his current branch is not master.
I suggest that rebase_myfork_rear.sh either implements
what is documented i.e.
echo "
Checkout local 'master' branch
"
git checkout master
echo "
Fetch upstream
"
git fetch upstream
or it checks that the current local branch is 'master' like
echo "
Check that current local branch is 'master'
"
if ! test master = $( git branch | cut -s -d '*' -f 2 ) ; then
echo "Error: Current local branch is not 'master'"
exit 1
fi
echo "
Fetch upstream
"
git fetch upstream
In general rebase_myfork_rear.sh does not check
if any 'git' command failed but blindly proceeds.
I think 'set -e' could be actually useful in this case
to not blindly proceed after there was an error.
By the way and for the fun of it:
Initially I had tried to get what the current local branch is via
current_branch=( $( git branch | grep '^* ' ) )
but
echo "${current_branch[@]}"
shows that the current_branch array elements are technically right
but not what I had offhandedly expected ;-)
For even more fun with it:
There is intentionally no usual string quoting "..."
in
test master = $( git branch | cut -s -d '*' -f 2 )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.