[精讚] [會員登入]
919

[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

你可能感興趣的文章

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

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

使用virtualbox每次都忘記的事情 share folder from win host to linux guest vm

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

how to stop wildfly keeping standalone server log how to stop wildfly keeping standalone server log

using google Appscript to send messages through LINE NOTIFY 使用google app script傳送LINE NOTIFY

隨機好文

[java]縣市IDP建置 使用NetBeans建置IDP程式

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

在windows server建立radius服務使用active directory帳號驗證 setup windows server to add radius service using active directory accounts for authentication

proxmox5.x using duplicati as cloud backup strategy install duplicati program on Proxmox host for remote backup using google drive account

更新程式環境到wildfly18+openjdk11-phase3: 伺服器環境升級準備 upgrade jdk and wildfly on server