Golfreeze.packetlove.com: Life style of Golfreeze Canon400D Family kammtan.com Jazz Freebsd Unix Linux System Admin guitar Music

All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server => Loadtest gatling.io knowledge => Topic started by: golfreeze on กุมภาพันธ์ 10, 2016, 09:10:31 PM

Title: github clone push เกี่ยวกับ git รวมทุกอย่าง
Post by: golfreeze on กุมภาพันธ์ 10, 2016, 09:10:31 PM
ถ้าทำการ สั่ง ให้ push ทุกไฟล์ขึ้นไปบน github ของ account เรา แล้วมี error

$git remote -v
แล้วไม่มีแสดงขึ้นมา แสดงว่ายังไม่ได้ remote เข้า repo ของ account นั้นๆ
$git remote add origin https://github.com/golfreeze

แล้วสั่งอีกรอบ ก็จะเจอละครับผม : )
#:~/Mygit/.git$ git remote -v
origin  https://github.com/golfreeze (fetch)
origin  https://github.com/golfreeze (push)

ถ้าจะ rename repo ก็
$git remote set-url origin https://github.com/golfreeze/NagiosPacketNrpe

$ git remote -v
origin https://github.com/golfreeze/NagiosPacketNrpe (fetch)
origin  https://github.com/golfreeze/NagiosPacketNrpe (push)


หรือทำการลบ remote origin ก็
$git remote remove origin

แล้วทำการแอดใหม่ก็ได้ตามนี้ครับ
$git remote add origin https://github.com/golfreeze/NagiosPacketNrpe.git

หลังจากนั้นทำการออกมาจาก .git folder
$cd ..
$git pull origin master
จะทำการดึงไฟล์มาจาก repo เราก่อน หลังจากนั้นค่อยทำการ push file ขึ้นไปในนั้น
$git push origin master

เท่านี้ก็เรียบร้อยครับ ทำการอัฟโหลดไฟล์จาก เครื่องเราขึ้น github ของ account เราเรียบร้อย : )

reference : http://stackoverflow.com/questions/15437719/git-push-error-origin-does-not-appear-to-be-a-git-repository

//choose folder to update file to github
git add --all
git commit -am 'EXCL'
git push

//if fail to push try to force
git push --set-upstream origin master -f
Title: Re: github
Post by: golfreeze on กันยายน 02, 2016, 09:39:13 PM
##ทำการสร้าง folder Mygit ใน account เรา
$git init Mygit
$cd Mygit

ทำการ clone จาก https://github.com/gurayyarar/AdminBSBMaterialDesign/
$git clone https://github.com/gurayyarar/AdminBSBMaterialDesign/

ก็จะได้ folder "AdminBSBMaterialDesign" มาครับผม
Title: Re: github clone push เกี่ยวกับ git รวมทุกอย่าง
Post by: golfreeze on กันยายน 02, 2016, 09:44:55 PM
https://help.github.com/articles/importing-a-git-repository-using-the-command-line/
https://help.github.com/articles/cloning-a-repository/
Title: Re: github clone push เกี่ยวกับ git รวมทุกอย่าง
Post by: golfreeze on กันยายน 03, 2016, 02:35:50 PM
ถ้าทำการ สั่ง ให้ push ทุกไฟล์ขึ้นไปบน github ของ account เรา แล้วมี error

$git remote -v
แล้วไม่มีแสดงขึ้นมา แสดงว่ายังไม่ได้ remote เข้า repo ของ account นั้นๆ
$git remote add origin https://github.com/golfreeze

แล้วสั่งอีกรอบ ก็จะเจอละครับผม : )
#:~/Mygit/.git$ git remote -v
origin  https://github.com/golfreeze (fetch)
origin  https://github.com/golfreeze (push)

ถ้าจะ rename repo ก็
$git remote set-url origin https://github.com/golfreeze/NagiosPacketNrpe

$ git remote -v
origin https://github.com/golfreeze/NagiosPacketNrpe (fetch)
origin  https://github.com/golfreeze/NagiosPacketNrpe (push)


หรือทำการลบ remote origin ก็
$git remote remove origin

แล้วทำการแอดใหม่ก็ได้ตามนี้ครับ
$git remote add origin https://github.com/golfreeze/NagiosPacketNrpe.git

หลังจากนั้นทำการออกมาจาก .git folder
$cd ..
$git pull origin master
จะทำการดึงไฟล์มาจาก repo เราก่อน หลังจากนั้นค่อยทำการ push file ขึ้นไปในนั้น
$git push origin master

เท่านี้ก็เรียบร้อยครับ ทำการอัฟโหลดไฟล์จาก เครื่องเราขึ้น github ของ account เราเรียบร้อย : )

reference : http://stackoverflow.com/questions/15437719/git-push-error-origin-does-not-appear-to-be-a-git-repository
Title: Re: github clone push เกี่ยวกับ git รวมทุกอย่าง
Post by: golfreeze on กันยายน 04, 2016, 09:45:09 AM
โจทย์คือ ถ้าต้องการ อัฟโหลดไฟล์ใหม่ หรือแก้ไขไฟล์เดิมเสร็จแล้ว  ขึ้นไปยัง repo ที่มีอยู่แล้ว ของเรา

เริ่มแรกเข้าไปยัง git folder ใน pc หรือ mac เราครับ
ไฟล์สมมุติ ชื่อเป็น check_eximmailqueue

$git add check_eximmailqueue
$git commit -m 'up check_eximmailqueue_new_version_2016'
$git push origin master
ทำการใส่ login ของเรา

เท่านี้ก็เรียบร้อยแล้วครับผม : )
ทำการเชคใน github ของเราก็จะเจอไฟล์พร้อมกับ ค่าที่ commit ไปว่า up check_eximmailqueue_new_version_2016
ไม่ยากเลยนะครับผม ลองเล่นกันดูนะครับ เหล่า dev ทั้งหลาย : )

reference : https://help.github.com/articles/adding-a-file-to-a-repository-from-the-command-line/
Title: Re: github clone push เกี่ยวกับ git รวมทุกอย่าง
Post by: golfreeze on กุมภาพันธ์ 17, 2018, 11:12:34 PM
https://daveismyname.blog/gitlab-deploy-to-server
gitlab deploy to server
Title: Re: github clone push เกี่ยวกับ git รวมทุกอย่าง
Post by: golfreeze on มกราคม 29, 2019, 02:39:00 PM
In case Cert let encrypt expired , way to renew cert from let encrypt
#gitlab-ctl reconfigure
Title: Re: github clone push เกี่ยวกับ git รวมทุกอย่าง
Post by: golfreeze on มกราคม 29, 2019, 02:40:11 PM
##Basic backup command
sudo gitlab-rake gitlab:backup:create
The backup file {$TIMESTAMP}_gitlab_backup.tar will be in /var/opt/gitlab/backups/

##Restore from existing backup data
gitlab-rake gitlab:backup:restore BACKUP=1548058563_2019_01_21_10.6.2
Copy the backup file to GitLab's backup folder, then:
sudo gitlab-ctl stop
cd /var/opt/gitlab/backups
sudo gitlab-rake gitlab:backup:restore BACKUP={$TIMESTAMP}
sudo gitlab-ctl start
sudo gitlab-rake gitlab:check SANITIZE=true
Restore gitlab-secrets.json Copy your gitlab-secrets.json to /etc/gitlab/gitlab-secrets.json Then run
sudo gitlab-ctl reconfigure