我在Git上有多个本地回购,但我想只使用一个

时间:2012-06-09 06:46:40

标签: git github github-for-windows

我仍在使用Git搞清楚基础并使用Gi​​tHub作为我的在线存储库。因此,当我试图自学并弄清楚所有内容时,我想我可能会因安装不同版本的Git Bash,Git GUI,Git Windows,Git Extensions而疯狂,但我主要使用的是Git Bash。

我必须对“git init”命令发疯,因为当我执行“git status”时,我会看到大量文件。我也在跟踪多个回购,但我只想一次只使用一个。所以我的问题,最后,我是如何解决这些冲突的,并且只能通过我本地机器上的Git bash一次使用一个.git?

当我执行“git status”时,这是当前显示的内容

$ git status
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 1 different commit(s) each, respectively.
#
# 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)
#   (commit or discard the untracked or modified content in submodules)
#
#       modified:   ../../../GitHub/GitHelloWorld (new commits)
#       modified:   ../../../GitHub/StopFoodWaste (new commits, modified content
)
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       ../../../../.RubyMine40/
#       ../../../../.android/
#       ../../../../.appletviewer
#       ../../../../.asadminpass
#       ../../../../.bash_history
#       ../../../../.gem/
#       ../../../../.gitconfig
#       ../../../../.gitignore
#       ../../../../.kdiff3rc
#       ../../../../.m2/
#       ../../../../.ssh/
#       ../../../../AppData/
#       ../../../../Contacts/
#       ../../../../Desktop/
#       ../../../../DiskScrP.txt
#       ../../../AdventureWorks2012_Data.mdf
#       ../../../Amazon MP3/
#       ../../../Battlefield 3/
#       ../../../BinaryTreeADT.class
#       ../../../BinaryTreeADT.java
#       ../../../CyberLink/
#       ../../../DataStrucNotes.docx
#       ../../../Dimitrios Arethas.docx
#       ../../../Dimitrios_Arethas_resume.rtf
#       ../../../Dimitrios_Arethas_resume_doc.docx
#       ../../../Expression/
#       ../../../Fiddler2/
#       ../../../German Reporter.m4v
#       ../../../GoogleCodeJam.class
#       ../../../GoogleCodeJam.java
#       ../../../Greatwide_cover.docx
#       ../../../IISExpress/
#       ../../../ITCS2175/
#       ../../../ITCS2214/
#       ../../../ITCS3200 Notes.docx
#       ../../../ITIS - Ethics/
#       ../../../Music/
#       ../../../My Kindle Content/
#       ../../../My Shapes/
#       ../../../My Web Sites/
#       ../../../Notes/
#       ../../../ProjectEuler.class
#       ../../../ProjectEuler.java
#       ../../../SQL Learn/
#       ../../../SQL Server Management Studio/
#       ../../../SaaS Class/
#       ../../../SharpDevelop Projects/
#       ../../../Visual Studio 11/
#       ../../../Visual Studio 2005/
#       ../../../Visual Studio 2008/
#       ../../
#       ../../../Youcam/
#       ../../../dativ_prepositions.docx
#       ../../../desktop.ini
#       ../../../dimitrios_engagement_checklist.doc
#       ../../../dimitrios_trial_schedule.doc
#       ../../../eclipse/
#       ../../../gitscc.config
#       ../../../me.jpg
#       ../../../workspace-sts-2.9.1.RELEASE/
#       ../../../../Downloads/
#       ../../../../Dropbox/

no changes added to commit (use "git add" and/or "git commit -a")

1 个答案:

答案 0 :(得分:0)

在远程端,您可以使用git remote查看您的遥控器仓库:

git remote -v

使用

删除不需要的内容
git remote rm name

请参阅“Working with Remotes”。

在状态方面,尝试查找您拥有的所有.git目录。 您应该位于GitHub/yourRepo目录中,而不是.git几乎位于此C:\