︿
Top
顯示具有 git 標籤的文章。 顯示所有文章
顯示具有 git 標籤的文章。 顯示所有文章

2022年10月25日 星期二

行尾結束字元探討(End of Line) PART 2 : Vs Code

前言

在前一篇 行尾結束字元探討 PART 1 : Git, 針對 行尾結束字元(End of Line) 在 Git 上的一些議題, 作了一些討論.

本篇再針對 End of Line 在 Vs Code 上的一些議題, 作一些討論.

經過實測發現, 雖然前一篇提到出現 "warning: in the working copy of '.gitignore', LF will be replaced by CRLF the next time Git touches it" 的訊息, 其實對整個版控並無影響, 只是一個提醒而已; 但這整個過程, 將以前沒有注意到的細節, 作了一次探討; 也第一次在 Ubuntu 上安裝 ASP.NET Core 6.0 SDK 及 Visual Studio Code, 並在 Ubuntu 上進行程式修及版控, 也算是有收穫了.

行尾結束字元探討(End of Line) PART 1 : Git

前言

最近在 study vs code + dotne CLI 的開發方式, 當然也括 git 的部份. 當手工下達 git add . 指令時, 會出現 LF will be replaced by CRLF the next time Git touches it 的警告訊息.

PS D:\22-Projects.Git\52-ASP.NET Core\MvcFriends> git add .
warning: in the working copy of '.gitignore', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.vscode/launch.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css', LF will be replaced by CRLF the next time Git touches it

2018年7月16日 星期一

Sublime Text 3 與 Git (GitHub) 版控機制的整合

0.. 前言


距離前一次使用 Sublime Text 已經快 4 年了, 筆者當時寫了一篇 "Sublime Text 3 操作 與 Emmet 套件安裝及使用 "; 最近因為參加一門 Bootstrap 4 的課程, 而有機會再次接觸.

本文主要在於說明 Sulime Text 與 git (github) 版控機制的整合; 雖然網路上可以查到一些文章, 但總是自己下去作過, 有痛過, 才會有經驗, 故作成筆記, 供有興趣的朋友參考.

本文共區分以下幾個段落, 相關的範例, 可 由此下載.
1.. 以 Package Control 安裝 git plug-in.
2.. 建立一個測試資料夾 (z1-vc_test), 並複製 bootstrap 4 相關的 css 及 js, 建立一個 01.html (based on bootstrap 4 範本)
3.. File / Open Folder ...
4.. 建立 project 及 workspaces
5.. 以 Package Control 安裝 gitignore plug-in.
6.. 建立 .gitignore 檔案, 並存檔
7.. 將現有專案加到本地 Git
8.. 建立第 1 個版本
9.. 加入 1 個檔案試試 ( 02.html )
10.. 查詢異動歷程
11.. 異動1個檔案(01.html), 刪掉1個檔案(02.html) 試試
12.. 上版到 GitHub

事先需準備的環境如下:
(1) SublimeText 3 : 可參考筆者的 這篇, 進行安裝及設定
A. Package Control 套件
B. Emmet plug-in
(2) Git : 可 由此下載及安裝
(3) GitHub : 已申請帳號, 並會建立 repository.


2016年11月25日 星期五

[Git] 如何將本機目前已存在的 git 版控 C# 主控台專案, 發行到 github


一. 前言


因為本機有一個啟用 git 版控的 Entity Framework 主控台專案, 在告一段落時, 想要撰寫 blog, 同時將相關的程式碼, 上傳至 github 分享; 故有需要將儲存在本機的 git 版控, 轉換為儲存至 github.