[精讚] [會員登入]
832

[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

你可能感興趣的文章

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

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

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

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

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

使用letsEncrypt替換docker容器內的nginx https憑證 using cerbot for nginx on oracle linux 9

隨機好文

設定win10開機自動執行openvpn連接vpn server how to make win10 connecting to a vpn server automactically after booting up

setup jira using ssl on apache reverse proxy 設定jira使用https連線

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

how to add physical disks into HP smart array through esxi interface 如何在磁碟陣列卡上加入新的硬碟-未完待續

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