Featured image of post Git on New Device

Git on New Device

If you want to use Git on a different computer and sync the files via Google Drive, how do you set it up on the new device? Here’s how.

Download App

  1. Download extended version Hugo, Go and Git
  2. Check exe file location
    (e.x. input where go in cmd)
  3. In system environment variables, add location of exe file of the three
    (e.x. C:\Program Files\Hugo\bin)

Generate SSH Key on Device

  1. Set git name for this device
    (e.x. input git config --global user.name "uan0623" in cmd)
  2. Set git email for this device
    (e.x. input git config --global user.email "pr346183@gmail.com" in cmd)
  3. Generate SSH key
    (e.x. input ssh-keygen -t ed25519 -C "pr346183@gmail.com" in cmd)
  4. Get key
    (e.x. input type C:\Users\user\.ssh\id_ed25519.pub in cmd)

Use HTTPS

There are two ways including SSH key, HTTPS. We use HTTPS and change remote link by git remote set-url origin https://github.com/uan0623/mywebsite.git, and then git push. With window popping up, we sign in with GitHub Password, Username

Question

  • Netlify deploy shows that the production failed. Why did it fail? and GPT indicated that the HUGO_VERSION in the netlify.toml file is incorrect. Both devices need to have the same Hugo version to resolve the issue.

Reference

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 建立
主題 StackJimmy 設計