Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
xcx



Excerpt

git provides a straight forward and strong commands, but sometimes scripts will help you to make things simpler.


Code Block
languagebash
titlegit_clone.sh
#!/bin/bash
echo Please input your commit message below \(blank to put as "bug fix"\)
read commit
sudo -u apache git config --global push.default simple
#sudo -u apache git branch --set-upstream-to=origin/master master
sudo -u apache git pull
sudo git add .
if [ ! "$commit" ]; then
    sudo -u apache git commit -m "bug fix"
else
    sudo -u apache git commit -m "$commit"
fi
sudo -u apache git push

sudo -u apache git pull

if [ "$2"] then
	sudo chmod 775 $2
fi


Code Block
languagebash
titlegit_push.sh
#!/bin/bash
sudo -u apache git push -f origin master

...