Skip to content

Commit

Permalink
Merge branch 'reset-github-clean' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyrg committed Jan 4, 2021
2 parents 13d4c2e + 2e776fb commit 74bacf8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2035,15 +2035,14 @@ reset github as if it's newly born. ALL history will be lost.
#!/bin/bash
#Maintained in linux-init-files.org
tfile=$(mktemp /tmp/config.XXXXXXXXX)
GITCONF=".git/config"
commitmsg=${1:-git repository initialised}
if [ -f $GITCONF ]; then
mv .git/config tfile
commitmsg=${1:-"git repository initialised"}
if [ -f .git/config ]; then
mv .git/config "$tfile"
rm -rf .git
git init .
mv tfile .git/config
mv "$tfile" .git/config
git add .
git commit -a -m "${commitmsg}"
git commit -a -m "$commitmsg"
git push -f
else
echo "Warning: No git config file found. Aborting.";exit;
Expand Down
6 changes: 3 additions & 3 deletions directories/bin/resgithub
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
tfile=$(mktemp /tmp/config.XXXXXXXXX)
GITCONF=".git/config"
commitmsg=${1:-git repository initialised}
if [ -f $GITCONF ]; then
mv .git/config tfile
if [ -f "$GITCONF" ]; then
mv "$GITCONF" tfile
rm -rf .git
git init .
mv tfile .git/config
mv tfile "$GITCONF"
git add .
git commit -a -m "${commitmsg}"
git push -f
Expand Down
11 changes: 5 additions & 6 deletions linux-init-files.org
Original file line number Diff line number Diff line change
Expand Up @@ -1899,15 +1899,14 @@
#!/bin/bash
#Maintained in linux-init-files.org
tfile=$(mktemp /tmp/config.XXXXXXXXX)
GITCONF=".git/config"
commitmsg=${1:-git repository initialised}
if [ -f $GITCONF ]; then
mv .git/config tfile
commitmsg=${1:-"git repository initialised"}
if [ -f .git/config ]; then
mv .git/config "$tfile"
rm -rf .git
git init .
mv tfile .git/config
mv "$tfile" .git/config
git add .
git commit -a -m "${commitmsg}"
git commit -a -m "$commitmsg"
git push -f
else
echo "Warning: No git config file found. Aborting.";exit;
Expand Down

0 comments on commit 74bacf8

Please sign in to comment.