[精讚] [會員登入]
995

[NetBeans]如何從git下載專案改建為自己的專案

修改git專案

分享此文連結 //n.sfs.tw/11989

分享連結 [NetBeans]如何從git下載專案改建為自己的專案@外行中的外行
(文章歡迎轉載,務必尊重版權註明連結來源)
2019-10-25 08:37:28 最後編修
2017-10-31 12:27:17 By jung
 

每次在git上新建專案可能設定錯誤,這時可採取clone一個完整專案回來改名的方式

經過igogo及axer兩位大神的指導,基本上需要下列步驟

1.進到netbeans用git把別的專案clone下來

2.到目錄將clone的專案改名,例如mlc-->mlctest

(這個步驟可省略,直接用netbeans專案按右鍵rename也可)

3. 用netbeans開啟改名後的專案,再選取專案按右鍵選擇Rename,完成後ok

(如果跳過步驟2,可直接rename folder)

 

4. 到目錄下將.git隱藏資料夾刪除

 

5. 再選擇git功能,初始化專案,選擇目錄位置,OK

6. 這時可用commit上傳,會出現錯誤commit [head] does not exist如下,按ok忽略(因為將.git目錄刪除)

 

7. 再用push上傳到gitlab上新建好的專案連結:

注意!! repository URL必須改成正確的自己在git雲端上的專案連結

選擇local branch後就會與遠端連結完成,這樣就改建完成了

8. 若需移除,直接到git網站去移除專案

在git專案的settings裡,expand advanced settings

往下拉就看到remove project的功能

必須再次確認

 

如果是merge或clone別人開的git專案就無法在web ui刪除

必須到終端機使用git command

https://koukia.ca/delete-a-local-and-a-remote-git-branch-61df0b10d323

git branch -D branch_name

The -D option stands for --delete --force, which deletes the branch regardless of its push and merge status, so be careful using this one!

 

刪除伺服器上自己建的branch:

git push <remote_name> --delete <branch_name>
END

你可能感興趣的文章

how to make wicket web application runs under docker enviorment with correct encoding 在docker環境下,wicket web application 編碼錯誤的問題

unknown issue after downgrade to intellij idea community version 使用社群版遇到的奇怪問題

在IDEA從JDK8升級到JDK11遇到的奇怪問題 在IDEA遇到的JAVA11函式庫引入問題

安裝netbeans9遇到的小狀況 how to show netbeans9 program onto ubuntu desktop

intellij IDEA git設定說明 whenever using git push fuction in the intellij IDEA

openssl package update issue caused by cve-2022-2068 centos7 is at maintenance support phase2, only critical impact security issues will be patched

隨機好文

在virtualbox如何壓縮vdi檔 using commands to reduce virtualbox's vdi file space

intellij IDEA git設定說明 whenever using git push fuction in the intellij IDEA

更新程式環境到wildfly18+openjdk11-phase4: 認證程式更新 認證程式更新

啟動chrome時要求須輸入密碼enter password to unlock login keyring asking for entering password to unlock login kerying on Ubuntu desktop

在intellij IDEA解決檔案內容顯示為UTF-8字碼而不是中文的問題 how to show correct language content of file, instead of utf-8 encoded charactors