You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cd~/.ssh && ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/phamha/.ssh/id_rsa):company
ssh-add ~/.ssh/company
cat company.pub | pbcopy
Git admend
git log --oneline
git commit --amend -m "Added lines to README.md"
git push -f #push force
Auto pull
#!/bin/bashwhiletrue;do
current_date=$(date +"%Y-%m-%d %H:%M:%S")echo"**************start***********************************"echo"start loop $current_date"echo"git fetch origin dev"
git fetch origin dev
if [[ -n$(git status -s) ]];thenecho"==>Changes detected. Committing..."
git add .
git commit -m "Merge remote-tracking branch 'origin/dev' into phamha98 $current_date"####### # git push origin phamha98echo"==>Changes committed and pushed."# Kiểm tra xem có thay đổi nào không
status=$(git status --porcelain package.json)if [[ -n$status ]];thenecho"package.json has changed. Running npm install..."
npm install
echo"npm install completed."elseecho"package.json has not changed."fi#########elseecho"==>No changes detected."fiecho"wait 30s **************end*********************************** "
sleep 30 # Chờ 15 phút (900 giây)done