1. pull.sh

#!/usr/bin/expect

set __REPO__ "____________________URL____________________"
set __ID__ "______________________ID_____________________"
set __PW__ "______________________PW_____________________"
set __TIME__ [exec env TZ=Asia/Seoul date +%Y-%m-%d\\ %H:%M:%S]

spawn git pull
expect "Username for"
send   "$__ID__\\r"
expect "Password for"
send   "$__PW__\\r"
expect eof

puts "Current date and time: $__TIME__"

2. push.sh

#!/usr/bin/expect

set __REPO__ "____________________URL____________________"
set __ID__ "______________________ID_____________________"
set __PW__ "______________________PW_____________________"
set __TIME__ [exec env TZ=Asia/Seoul date +%Y-%m-%d\\ %H:%M:%S]

spawn git pull
expect "Username for"
send   "$__ID__\\r"
expect "Password for"
send   "$__PW__\\r"
expect eof

exec git add .
exec git commit -m "\\[$__TIME__\\] update"

spawn git push
expect "Username for"
send   "$__ID__\\r"
expect "Password for"
send   "$__PW__\\r"
expect eof

puts "Current date and time: $__TIME__"