Skip to content

Commit

Permalink
Comment : on Sat Feb 4 13:38:19 CET 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdubois committed Feb 4, 2017
1 parent 007bd01 commit 286acd8
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 177 deletions.
73 changes: 73 additions & 0 deletions git-v1.sh
@@ -0,0 +1,73 @@
#!/bin/bash
#
##################################################################################################################
# Written to be used on 64 bits computers
# Author : Erik Dubois
# Website : http://www.erikdubois.be
##################################################################################################################
##################################################################################################################
#
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
#
##################################################################################################################

# echo "# Ultimate-Linux-Mint-18" >> README.md
# git init
# git add README.md
# git commit -m "first commit"
# git remote add origin https://github.com/erikdubois/Ultimate-Linux-Mint-18-Cinnamon.git
# git push -u origin master

# git config --global user.name x
# git config --global user.email x
# sudo git config --system core.editor nano
# git config --global credential.helper cache
# git config --global credential.helper 'cache --timeout=3600'


# Force git to overwrite local files on pull - no merge

# git fetch all

# git push --set-upstream origin master

# git reset --hard orgin/master


# checking if kernel files are present otherswise github will become too big

if [ -f linux* ]; then
echo "####################################"
echo "Stopping the script!!"
echo "Wait for the kernel update script to quit."
echo "####################################"
exit 0
fi


# checking if I have the latest files from github
echo "Checking for newer files online first"
git pull

# Below command will backup everything inside the project folder
git add --all .

# Give a comment to the commit if you want
echo "####################################"
echo "Write your commit comment!"
echo "####################################"

read input

# Committing to the local repository with a message containing the time details and commit text
curtime=$(date)
git commit -m "Comment : $input on $curtime"

# Push the local files to github

git push -u origin master


echo "################################################################"
echo "################### Git Push Done ######################"
echo "################################################################"
72 changes: 0 additions & 72 deletions git.sh

This file was deleted.

74 changes: 74 additions & 0 deletions setup-git-v1.sh
@@ -0,0 +1,74 @@
#!/bin/bash
#
##################################################################################################################
# Written to be used on 64 bits computers
# Author : Erik Dubois
# Website : http://www.erikdubois.be
##################################################################################################################
##################################################################################################################
#
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
#
##################################################################################################################

# Problem solving commands

# Read before using it.
# https://www.atlassian.com/git/tutorials/undoing-changes/git-reset
# git reset --hard orgin/master
# ONLY if you are very sure and no coworkers are on your github.

# Command that have helped in the past
# Force git to overwrite local files on pull - no merge
# git fetch all
# git push --set-upstream origin master
# git reset --hard orgin/master


# installing git if not installed for specific distro's

if ! location="$(type -p "git")" || [ -z "git" ]; then

echo "#################################################"
echo "installing git for this script to work"
echo "#################################################"

sudo apt install git -y
# check if apt-git is installed
if which apt-get > /dev/null; then

sudo apt-get install -y git

fi

# check if pacman is installed
if which pacman > /dev/null; then

sudo pacman -S --noconfirm git

fi

# check if eopkg is installed
if which eopkg > /dev/null; then

sudo eopkg -y install git

fi

fi

#setting up git
#https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config

git init
git config --global user.name "Erik Dubois"
git config --global user.email "erik.dubois@gmail.com"
sudo git config --system core.editor nano
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=18000'
git config --global push.default simple


echo "################################################################"
echo "################### T H E E N D ######################"
echo "################################################################"
105 changes: 0 additions & 105 deletions setup-git.sh

This file was deleted.

0 comments on commit 286acd8

Please sign in to comment.