Menu

Showing posts with label repository. Show all posts
Showing posts with label repository. Show all posts

Tuesday, February 2, 2021

[GIT] วิธีการเพิ่ม Remote URL ของ GIT Repository
[GIT] How to Add New Remote URL of GIT Repository

 การเปลี่ยน Remote URL ของ GIT Repository จำเป็นต้องใช้ 2 คำสั่งดังนี้

  • คำสั่งสำหรับตรวจสอบ GIT remote URL ปัจจุบัน
    git remote -v
  • คำสั่งสำหรับตั้งค่า Remote URL ของ GIT Repository ใหม่
    git remote add <new_remote_name> <new_git_remote_url>
ตัวอย่างการใช้งาน เช่น
$ git remote -v
origin  git@github.com:username/project.git (fetch)
origin  git@github.com:username/project.git (push)
$ git remote add test git@github.com:username/project2.git
$ git remote -v 
origin  git@github.com:username/project.git (fetch)
origin  git@github.com:username/project.git (push)
test git@github.com:username/project2.git (fetch)
test git@github.com:username/project2.git (push)

ข้อมูลเพิ่มเติม สามารถอ่านได้ที่ Adding a remote

Thursday, February 27, 2020

[GitHub] การสร้างเว็บไซต์จาก Repository บน GitHub
[GitHub] How to Create Website from Repository on GitHub

  1. สร้าง Repository บน GitHub
  2. เพิ่มไฟล์สำหรับหน้าเว็บ เช่น index.html, ไฟล์ CSS, ไฟล์ JS เป็นต้น ใน repository นั้น
  3. เข้าไปที่แท็บ Settings ของ repository นั้น
  4. เลื่อนลงไปยังส่วนของ GitHub Pages
  5. เลือก Source เป็น branch ที่เราเพิ่มไฟล์เข้าไปตามข้อ 2
  6. เรียกหน้าเว็บผ่าน URL ในรูปแบบดังนี้
  7. https://<username>.github.io/<repository_name>/<file_path>
    
    เช่น
    https://arzeroid.github.io/syntaxhighlighter_css_js/css/shThemeDefault.css

Monday, September 2, 2019

[GIT] วิธีการเปลี่ยน Remote URL ของ GIT Repository
[GIT] How to Change Remote URL of GIT Repository

การเปลี่ยน Remote URL ของ GIT Repository จำเป็นต้องใช้ 2 คำสั่งดังนี้
  • คำสั่งสำหรับตรวจสอบ GIT remote URL ปัจจุบัน
    git remote -v
  • คำสั่งสำหรับตั้งค่า Remote URL ของ GIT Repository ใหม่
    git remote set-url <current_remote_name> <new_git_remote_url>
โดยที่ new_git_remote_url จะมีรูปแบบ URL ดังนี้
  • URL สำหรับ HTTPS
    https://github.com/USERNAME/REPOSITORY.git
  • URL สำหรับ SSH
    git@github.com:USERNAME/REPOSITORY.git