![](/img/trans.png)
[英]I misstyped git remote add
我打錯了“git remote add origin ...”。 實際上,我輸入了“git remote add orginin”。 我怎樣才能把它改回原點? 我寧願不刪除我的本地存儲庫,如果我可以將 orginin 更改為 origin 那將是完美的。 我檢查了git remote -v 。 我得 ...
[英]I misstyped git remote add
我打錯了“git remote add origin ...”。 實際上,我輸入了“git remote add orginin”。 我怎樣才能把它改回原點? 我寧願不刪除我的本地存儲庫,如果我可以將 orginin 更改為 origin 那將是完美的。 我檢查了git remote -v 。 我得 ...
[英]How to find local git repositories without remote origin?
本地 git 存儲庫通常在沒有遠程存儲庫的情況下開始。 如何找到所有尚未推送的回購協議(=沒有遠程源附加到它們)? 遞歸文件夾搜索很慢。 ...
[英]Drop/delete remote commits from branch
在對本地分支機構的一些提交進行變基和刪除/使用修復后,我注意到拉取請求中有 4 個提交我在本地找不到。 我該如何擺脫那些? ...
[英]git push hangs on the "Total" line only for a specific branch
我正在嘗試將特定本地分支上的 4 次提交推送到我位於私有 Git 服務器上的遠程存儲庫。 推送進度顯示如下: 它掛在“總計”行之后。 我試過等待超過 10 分鍾,但沒有運氣。 提交沒有任何大文件,都是帶有小改動的文本文件。 我根據對類似問題的回答嘗試了以下方法: 通過運行git config --g ...
[英]Git config remote.origin.tagOpt --no-tags has no apparent effect
每次我嘗試更新特定存儲庫時,它都會失敗,因為維護者會定期更改nightly標簽: 我在 .git/config 中添加了remote.origin.tagOpt = --no-tags 。 該設置顯然是無用的,因為它無論如何都會獲取標簽。 我也試過remote.origin.prune = true ...
[英]Unencrypted HTTP is not supported for Gitlab
當我嘗試將項目從 GitLab 克隆到 Android studio 時,出現錯誤提示克隆失敗,GitLab url 是 HTTP。 錯誤信息是: Gitlab 不支持未加密的 HTTP。 同樣的 GitLab url 正在為我的隊友工作,但不為我工作。 請建議我是否必須更改 Android 工 ...
[英]Why doesn't github throw an error ! [remote rejected] master -> master (branch is currently checked out) and a remote server does?
假設我這樣做。 使用 github 在本地機器上: git init testrepo 在 github 上:進行回購測試。git 在 web 界面中按下按鈕在本地: cd testrepo git remote add origin https://github.com/Someuser/tes ...
[英]How to configure remote upstream without `git push`
是否可以在不執行git push的情況下為新的本地分支配置遠程上游分支? 我認為這是git branch的--set-upstream-to選項的用途,但我收到以下錯誤: 我知道 push 命令的配置在推送時自動執行此操作,但我不想使用它。 我想做的是編寫一個腳本,確保主分支被推送remote1而所 ...
[英]Git push fork <branch-name> failed
你好,我正在嘗試從現有存儲庫創建一個新的 PR,我得到了這個錯誤:“錯誤:src refspec new does not match any” 這是我的步驟: 第 1 步 - 創建分叉 ( https://docs.github.com/en/get-started/quickstart/fork ...
[英]Permission Denied with git remote add in Github Actions
在本地,我可以進行 git 部署和推送。 在我的 github 操作中,在 npm 構建運行后設置以下內容:cd build git init git config user.email 'email@email.com' git config user.name 'github-actions - ...
[英]How can I work with a local branch and a remote branch?
我正在使用本地存儲庫和服務器上的存儲庫。 服務器分支的名稱應該是“master”,而我想命名為“local”的本地分支。 使用git branch -a我列出了我的所有分支: 我猜這里的* master是我目前實際工作的本地存儲庫。 我不明白的是,什么是origin/HEAD? 為什么它指向ori ...
[英]modify local branch base on origin/master will affect local master branch?
我在origin/master分支的基礎上創建了一個名為test的分支,然后我對test分支做了一些修改,我發現本地的master分支也出現了同樣的修改,這正常嗎? 或者我應該怎么做才能避免這種情況再次發生,我應該在另一個遠程分支上創建一個分支基礎嗎? 感謝您的回答 ...
[英]Delete tags fetched from one repository of many
我有一個移植的開源項目,我想在新版本上更新它,所以我添加了包含項目必要更新的遠程存儲庫,但我弄錯了鏈接並添加了另一個,執行git fetch --all所以我獲取從遠程存儲庫到我的本地存儲庫的所有提交和標簽,然后添加正確的遠程存儲庫並獲取它,解決合並沖突並推送如果帶有標簽git push --tag ...
[英]Rewording past commits that caused merge conflicts
我正在練習如何使用 git。 我提交了一個提交,另一個貢獻者提交了一個導致合並沖突的提交,然后我們解決了合並沖突並意識到導致合並沖突的前兩個提交具有相同的提交消息。 所以我們嘗試使用 git rebase -i to go 到 VIM 並使用 reword 語法對其進行改寫。 保存並退出 VIM 編 ...
[英]How to reset a remote git branch to its initial state
我正在處理一個從主分支分支出來的 git 分支,並且我已經對其進行了多次提交,但是現在我想將該分支重置為其早期狀態,當我第一次從主分支分支它時。 我的意思是我想刪除我已經提交的所有提交並將其推入其中,以便它與主要提交完全相同。 當我這樣做時: 它給了這個: 這是我最后一次提交。 但我想刪除 ...
[英]Error while mirroring from Github to AWS CodeCommit
我在eu-central-1創建了一個 AWS CodeCommit 存儲庫。 我計划將 GitHub 中的存儲庫同步到 AWS CodeCommit。 所有當前代碼和未來 PR 合並到 main 和 preprod 都應該在 AWS CodeCommit 中。 我正在使用此腳本在我的 Jenkin ...
[英]Not able to add remote repository
我想將更改從本地存儲庫推送到我的 github 存儲庫。 我從 github quickstep 給出的命令開始: 接着 有什么建議可以出錯嗎? ...
[英]How to determine git remote name by giving the repo URL?
我正在嘗試獲取給定 URL 的遠程名稱: 有沒有辦法通過提供 URL git@github.com:foo/bar.git來確定它屬於哪個遠程來找到遠程名稱? ...
[英]Connecting to git remote from Laravel devcontainer on VSC on windows
我在 Windows 上的 Visaul Studio Code 中使用開發容器。 我使用 laravel 帆助手構建了這個開發容器。 它在 Docker 桌面和 WSL2 上運行。 這是開發容器 json: 這是 docker 作曲家文件: 它在本地工作並推送到我的 github 存儲庫 ...
[英]Git log for the next change on a specific file line in a remote branch
我正在探索項目FFMpeg的 git 歷史。 通過使用以下命令創建補丁,我在提交517573a67088b5c7a25c18373434e3448892ee93和80bb65fafab1d2f5f58a8453c6334c784ee27c08之間對每個文件執行了更改: 現在,例如,我知道文件doc/ ...