Tools

  • Home

  • Archives

git

Posted on 2019-04-17 | Edited on 2019-06-03

Git 使用 遠端 Branch

$ git branch -r # 看遠端有什麼 branch

GitLab and SSH keys

Git for Windows

The easiest way to install Git and the SSH client on Windows 8.1 and Windows 7 is Git for Windows. It provides a Bash emulation (Git Bash) used for running Git from the command line and the ssh-keygen command that is useful to create SSH keys as you’ll learn below.

RSA SSH keys

首先你需要在github上或者gitlab上有一個自己的賬戶

打開git bash,輸入命令ls -al ~/.ssh。檢查是否顯示有id_rsa.pub存在

在git bash中鍵入
$ ssh-keygen -t rsa -C "your_email@example.com"
注意將這裡的郵箱地址替換成你自己的郵箱地址。之後一直按回車就可以了。在這裡可以看到id_rsa和id_rsa.pub文件已經生成。並且生成的路徑也已顯示。

用記事本之類的軟件打開id_rsa.pub文件,並且複製全部內容。這裡記錄的是公鑰信息。
在你的gitlab或者github的賬戶,打開SSH key標籤。
然後選擇Add SSH key按鈕,將剛剛複製的內容粘貼進去即可,然後點擊add key。

撤銷git add
git reset HEAD .

Tools

Posted on 2019-04-16 | Edited on 2019-04-18

Tutorials

JavaScript Weekly
Egghead Learn the best JavaScript tools and frameworks from industry pros.
Frontend Masters
Wes Bos

Icon

Iconfont
Potlab Icons

CSS

CSSeffectsSnippets

Music

WOWA

一個收集免費音樂的網站,可以下載用來製作視頻的背景音樂。該網站的目標是成為免費音樂的 Unsplash。

Data

On This Day

12

Jacob Hsu

12 posts
© 2019 Jacob Hsu
Powered by Hexo v3.8.0
|
Theme – NexT.Muse v7.0.0