日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【转】PhpStorm 提交代码到远程GitHub仓库

發布時間:2025/7/14 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【转】PhpStorm 提交代码到远程GitHub仓库 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?

轉載地址:http://my.oschina.net/lujianing/blog/180728

1.下載github for window

http://windows.github.com/

2.設置相關綁定

Settings ?——Version Control——Git——Path to Git executable——選擇你的安裝目錄

C:\Users\Administrator\AppData\Local\GitHub\PortableGit_0f65d050d0c352fd38a0b25d82ee942deb19ef87\bin\git.exe

Test

Settings ?——Version Control——GitHub?

Host:github.com ?Login:賬號 ?Password:密碼

Test

3.項目的本地git提交

intellij內部集成了git版本控制 所以在本地可以直接進行使用

3.1創建本地倉庫

3.2提交代碼到本地git

右鍵項目或者文件?Git——Add——Commit (先add 然后再提交)

?

4.配置遠程提交

4.1 github上創建倉庫

4.2 Git Shell中配置遠程倉庫

?

cd 項目目錄git remote add origin https://github.com/lujianing/ueditor.gitgit push -u origin master 中間如果有報錯 請參考下邊的解決方法

1.fatal: remote origin already exists

git remote rm origin

2.error: Could not remove config section 'remote.origin'

需要修改gitconfig文件的內容?找到github的安裝路徑,我是

C:\Users\Administrator\AppData\Local\GitHub\PortableGit_6d98349f44ba975cf6c762a720f8259a267ea445\etc
找到一個名為gitconfig的文件,打開它把里面的[remote "origin"]那一行刪掉

重啟gitshell ?執行上述操作

4.3 Intellij IDEA中進行push/pull

右鍵項目 Git——Repository——Push?

在開發過程中 我們可以使用本地的git進行版本管理 ?最后使用push進行遠程提交

4.4 多人協作開發

在Github 項目的 settings——Collaborators 下可以添加項目成員

被添加的用戶 可以提交代碼到當前項目中

?

5.另一種簡單方法

在github上創建倉庫后 復制倉庫地址 比如?https://github.com/lujianing/demo.git

在intelij中 VCS——Checkout from Version Contrl——Git中 粘貼倉庫url地址

會從github倉庫中拷貝一份項目 ? 然后就可以在本地直接進行git操作

并且可以push到github倉庫中 (會提示你輸入github的倉庫和密碼)

轉載于:https://www.cnblogs.com/whroid/p/3963892.html

總結

以上是生活随笔為你收集整理的【转】PhpStorm 提交代码到远程GitHub仓库的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。