簡體   English   中英

本地git不起作用-Xcode 4.6

[英]Local git not working - Xcode 4.6

我在我的項目上設置本地git存儲庫時遇到了很多麻煩。 我創建了一個全新的項目並將所有文件拖到其中,並確保檢查了git / version控件的勾號。

現在,我在組織者中看到了存儲庫(文件系統指向正確的位置),可以在組織者中使用“全部PullCommit ”按鈕:

在此處輸入圖片說明

但是,當我在實際項目中進行任何更改時,即使進行更改,也不會顯示源代碼控制標志,即MA等。 當我嘗試推動(或執行任何操作)時,它說沒有遙控器(有遙控器...):

在此處輸入圖片說明

似乎該項目實際上沒有以某種方式附加到存儲庫中...

編輯:終端中的git status

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#   (use "git push" to publish your local commits)
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   CrunchCalculator-1-2.xcodeproj/project.xcworkspace/xcuserdata/Neil.xcuserdatad/UserInterfaceState.xcuserstate
#   modified:   CrunchCalculator-1-2/ViewController.h
#
no changes added to commit (use "git add" and/or "git commit -a")

經過幾個小時的重新啟動,測試和搜索解決方案……事實證明,您要做的就是更改項目的名稱。 通過單擊主項目文件夾(藍色)並單擊Enter,然后將名稱更改為其他名稱,這解決了問題。

更改項目名稱!

不要將XCode用於GIT,而應使用命令行。

該鏈接為您提供了各種GIT命令的用法git

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM