I am trying to set git up with http://danielmiessler.com/study/git/#website to manage my site. I am working using the git gui in win7
I have gotten to the last step
EDIT: ok, so now I see your problem.
This is the script you need:
#!/bin/sh
echo
echo "**** Pushing data to Live Server.">>~/hi.txt
echo
GIT_WORK_TREE=/home/***/public_html/b1a git checkout -f
I really don't know why nor how this works, but it does.
I don't know either why you were redirecting the export
output to those files - do you really need that?
This script just check's out the current HEAD
of the repository to the GIT_WORK_TREE
directory. That's it. If you need anything else, please comment.
I think you're not exporting GIT_WORK_TREE
variable.
Try changing those lines so you really export that variable instead of just setting it:
#!/bin/sh
echo
echo "**** Pushing data to Live Server.">>~/hi.txt
echo
export GIT_WORK_TREE=/home/***/public_html/b1a
export > ~/.file1.txt
git checkout -f
The first export
sets GIT_WORK_TREE
value's and marks it for export, the second one outputs all current exported variables to the file.
I'm running this on Linux, but I hope it's the same on git-bash...