Skip to content

Commit 54743d3

Browse files
committed
update for 7.x
1 parent 70b8613 commit 54743d3

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

git-basics.sh

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# Remember to chmod +x git-basics.sh first, then paste this command in your terminal
99
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/wilsonmar/git-utilities/master/git-basics.sh)"
1010

11-
RUNTYPE="reuse"
12-
#remove
13-
#update
14-
#reuse (previous version of repository)
15-
11+
RUNTYPE=""
12+
# remove
13+
# update
14+
# reset (to wipe out files saved in git-utilities)
15+
# reuse (previous version of repository)
1616

1717
function fancy_echo() {
1818
local fmt="$1"; shift
@@ -224,7 +224,7 @@ c_echo "hub delete \"$OTHER_REPO\""
224224
hub delete "$OTHER_REPO"
225225
echo "Not Found is OK if it was not created last run."
226226

227-
fancy_echo "3.4 Use hub to clone and fork ..."
227+
fancy_echo "3.4 Use hub to clone \"$OTHER_ACCT/$OTHER_REPO\" ..."
228228
c_echo "cd && cd \"$WORKSPACE_FOLDER\" "
229229
cd && cd "$WORKSPACE_FOLDER"
230230

@@ -236,23 +236,29 @@ c_echo "cd \"$OTHER_REPO\" && PWD && git remote -v && ls -al ..."
236236
git remote -v
237237
ls -al
238238

239+
fancy_echo "3.5 Use hub to fork \"$OTHER_ACCT/$OTHER_REPO\" ..."
239240
c_echo "hub fork \"$OTHER_ACCT/$OTHER_REPO\""
240-
hub fork "$OTHER_ACCT/$OTHER_REPO"
241+
hub fork "$OTHER_ACCT/$OTHER_REPO"
241242

242243
c_echo "cd \"$OTHER_REPO\" && PWD && git remote -v && ls -al ..."
243244
cd "$OTHER_REPO"
244245
echo "PWD=$PWD"
245246
git remote -v
246247
ls -al
247248

248-
hub remote add "$MYACCT" # wilsonmar
249-
git remote rename origin upstream
250-
git remote rename "$MYACCT" origin
249+
c_echo "hub remote add \"$MYACCT\""
250+
hub remote add "$MYACCT" # wilsonmar
251+
252+
c_echo "git remote rename origin upstream"
253+
git remote rename origin upstream
254+
255+
c_echo "git remote rename "$MYACCT" origin"
256+
git remote rename "$MYACCT" origin
251257

252258
c_echo "git pull --all"
253259
git pull --all
254260

255-
fancy_echo "3.5 git remote -v ..."
261+
fancy_echo "3.5 git remote -v"
256262
git remote -v
257263

258264
fancy_echo "3.6 Manually see the fork in your cloud account ..."
@@ -371,11 +377,12 @@ fancy_echo "6.7 git push origin :feat1 # to remove in cloud"
371377

372378
# Check manually on GitHub for new tag.
373379

374-
fancy_echo "8.1 Use a different browser to login to $OTHER_ACCT/$OTHER_REPO ... "
375-
read -rsp $'Press any key after adding a file ...\n' -n 1 key
380+
fancy_echo "7.x Request request, use a different browser to $OTHER_ACCT/$OTHER_REPO."
381+
read -rsp $'Press any key after adding a file in $OTHER_ACCT/$OTHER_REPO ...\n' -n 1 key
376382
# See https://unix.stackexchange.com/questions/134437/press-space-to-continue
377383
# See https://stackoverflow.com/questions/92802/what-is-the-linux-equivalent-to-dos-pause
378384

385+
379386
fancy_echo "8.2 git remote add upstream https://$GITHOST/$OTHER_ACCT/$OTHER_REPO ..."
380387
git remote add upstream "https://$GITHOST/$OTHER_ACCT/$OTHER_REPO"
381388
echo ">>> No output expected."
@@ -412,8 +419,8 @@ fancy_echo "9.3 git diff master..origin/master"
412419
git diff master..origin/master
413420
#gitk master..origin/master
414421

415-
fancy_echo "9.4 git merge origin/master -m\"9.4 thank you\""
416-
git merge origin/master -m "9.4 thank you"
422+
fancy_echo "9.4 git merge origin/master -m\"9.4 thank you\" --no-edit"
423+
git merge origin/master -m "9.4 thank you" --no-edit
417424

418425

419426
FREE_DISKBLOCKS_END=$(df | sed -n -e '2{p;q}' | cut -d' ' -f 6)

0 commit comments

Comments
 (0)