git-init

git init will not create git directories for me

喜欢而已 提交于 2020-01-21 03:19:11
问题 I am new to Git. I can get a Git directory structure in a bare directory with git -init --bare . I can see where the git information is stored. However, when I try to use git init or even git clone , I never see any .git subdirectory in my local repository. I can add files and push, but have no idea where those files are actually stored on disk for my local repository. From the documentation: $ git init This creates a new subdirectory named .git that contains all of your necessary repository

How to add an existing nested repo (already checked out in a subdir) to a parent Git repo as a submodule?

怎甘沉沦 提交于 2019-12-12 10:37:44
问题 What happens if I'm creating the initial commit from my working (parent) directory, but there are subdirs with independently checked-out git repos? I simply did git add . but that brought me to a strange situation when the subdirs with nested Git repos are not registered as submodules of the parent repo. So: how to proceed after an initial "git add ." in a parent working dir where there have been subdirs with independetly checked-out nested git repos (in order to get correct submodules)? An

Is there a command to undo git init?

一世执手 提交于 2019-11-27 02:28:29
I just Git init'ed a repos with a wrong user, and want to undo it. Is there any command for this? Do I actually have to go in and edit the .git directory? Matthew Flaschen You can just delete .git. Typically: rm -rf .git Then, recreate as the right user. In windows, type rmdir .git or rmdir /s .git if the .git folder has subfolders. If your git shell isn't setup with proper administrative rights (i.e. it denies you when you try to rmdir ), you can open a command prompt (possibly as administrator--hit the windows key, type 'cmd', right click 'command prompt' and select 'run as administrator)

Is there a command to undo git init?

不打扰是莪最后的温柔 提交于 2019-11-26 08:38:55
问题 I just Git init\'ed a repos with a wrong user, and want to undo it. Is there any command for this? Do I actually have to go in and edit the .git directory? 回答1: You can just delete .git. Typically: rm -rf .git Then, recreate as the right user. 回答2: In windows, type rmdir .git or rmdir /s .git if the .git folder has subfolders. If your git shell isn't setup with proper administrative rights (i.e. it denies you when you try to rmdir ), you can open a command prompt (possibly as administrator-

How to fully delete a git repository created with init?

纵饮孤独 提交于 2019-11-26 00:38:46
问题 I created a git repository with git init . I\'d like to delete it entirely and init a new one. 回答1: Git keeps all of its files in the .git directory. Just remove that one and init again. If you can't find it, it's because it is hidden. In Windows 7, you need to go to your folder, click on Organize on the top left, then click on Folder and search options , then click on the View tab and click on the Show hidden files, folders and drives radio button. On a Mac OS: Open a Terminal (via Spotlight