[精讚] [會員登入]
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

你可能感興趣的文章

specific instructions to create a maven archetype from local existing project. Generate an archetype from the project

如何用git log功能產生有固定格式的commit紀錄 how to create a git commit history log file with custom format

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

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

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

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

隨機好文

縣市IDP新增API功能 修改IDP程式增加API介面

在windows環境下強制刪除無法以檔案總管刪除的檔案或目錄 how to remove directories or files that cannot be deleted by default file manager

更新程式環境到wildfly18+openjdk11-phase1: upgrade mongodb server 更新程式環境到wildfly18+openjdk11-phase1: upgrade mongodb server to version 3.6

zfs on ubuntu 20.04 how to destroy zfs pool while error message said pool is busy

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