मैं गिट के लिए नया हूं। मैं बस इसे अपनी स्थानीय मशीन पर संस्करण नियंत्रण के लिए उपयोग कर रहा हूं। मैंने git init
द्वारा अपना गिट रेपो शुरू किया है। मैंने मैन्युअल रूप से कुछ फ़ोल्डरों को जोड़ा है जिन्हें मुझे git add "folder name"
तक चाहिए। एक विशेष फ़ोल्डर है जिसे मैं एक ही कमांड का उपयोग करके जोड़ नहीं पा रहा हूं। यह अन्य निर्देशिका के समान निर्देशिका में शामिल है। लेकिन मुझे fatal: Not a git repository "some path"
मिल रहा है। मुझे समझ में नहीं आता कि समस्या क्या है।घातक: एक गिट भंडार नहीं - त्रुटि
जोड़ना आउटपुट
[email protected]:/home/kougaikw/test# git --version
git version 1.8.3.2
[email protected]:/home/kougaikw/test# git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: main.html
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .DS_Store
# css/
# fonts/
# images/
# instance-config.json
[email protected]:/home/kougaikw/test# ls -l
total 36
drwxr-xr-x 2 root root 4096 Apr 5 17:04 css
drwxr-xr-x 2 root root 4096 Apr 5 17:04 fonts
drwxr-xr-x 5 root root 4096 Apr 5 17:04 images
-rw-r--r-- 1 root root 1004 Mar 13 08:25 instance-config.json
drwxr-xr-x 10 root root 4096 Apr 5 17:05 js
-rw-r--r-- 1 root root 695 Jan 7 08:50 main.html
drwxr-xr-x 8 root root 4096 Apr 5 17:06 mocks
drwxr-xr-x 13 root root 4096 Apr 5 17:07 plugins
drwxr-xr-x 14 root root 4096 Apr 5 17:07 templates
[email protected]:/home/kougaikw/test# git add js
fatal: Not a git repository: js/libs/testfolder/../../../../.git/testfolder/html/js/libs/modules
समाधान
मैं एक फ़ोल्डर बुलाया था ".git" निर्देशिका js/libs/testfolder अंदर। इसे हटाया गया और ठीक काम करता है
आप अपने त्रुटि संदेश googling की कोशिश की है पाया जा सकता है? –
हां मैंने किया, ज्यादातर जवाब 'गिट इनिट' के बारे में कहते हैं। लेकिन मैंने पहले से ही – user3392740
किया है, क्या आप कृपया 'गिट --वर्जन; गिट स्थिति का सटीक आउटपुट जोड़ सकते हैं; ls -l; git "फ़ोल्डर नाम" जोड़ें? (निश्चित रूप से परेशानी वाले फ़ोल्डर के साथ जब तक इसे वास्तव में "फ़ोल्डर का नाम" नहीं कहा जाता है।) – michas