git - Initial Commit: "fatal: could not create leading directories of ..." -
i trying make initial commit git repository on github unity project. followed along this guide am. note: reason or another, couldn't set unity's asset serialization mode force text, settled on mixed (which believe should work).
when call git clone --bare . , error.
note not creator of repository , contributor (though making initial commit).
here's in terminal (i'm using git bash):
welcome git (version 1.8.4-preview20130916) run 'git git' display index. run 'git <command>' display specific commands. cheddar@cheddar-pc ~ $ cd documents/ics168swarch/ cheddar@cheddar-pc ~/documents/ics168swarch $ git init initialized empty git repository in c:/users/cheddar/documents/ics168swarch/.git / cheddar@cheddar-pc ~/documents/ics168swarch (master) $ git add . warning: lf replaced crlf in assets/prefabs.meta. file have original line endings in working directory. warning: lf replaced crlf in assets/prefabs/pellet.prefab.meta. file have original line endings in working directory. warning: lf replaced crlf in assets/prefabs/pelletmanager.prefab.meta . file have original line endings in working directory. warning: lf replaced crlf in assets/prefabs/player.prefab.meta. file have original line endings in working directory. warning: lf replaced crlf in assets/scene1.unity.meta. file have original line endings in working directory. warning: lf replaced crlf in assets/scripts.meta. file have original line endings in working directory. warning: lf replaced crlf in assets/scripts/eatpellets.cs. file have original line endings in working directory. warning: lf replaced crlf in assets/scripts/eatpellets.cs.meta. file have original line endings in working directory. warning: lf replaced crlf in assets/scripts/movement.cs. file have original line endings in working directory. warning: lf replaced crlf in assets/scripts/movement.cs.meta. file have original line endings in working directory. warning: lf replaced crlf in assets/scripts/spawnpellets.cs. file have original line endings in working directory. warning: lf replaced crlf in assets/scripts/spawnpellets.cs.meta. file have original line endings in working directory. warning: lf replaced crlf in library/scriptassemblies/compilationcomp leted.txt. file have original line endings in working directory. error: open("temp/unitylockfile"): permission denied error: unable index file temp/unitylockfile fatal: adding files failed cheddar@cheddar-pc ~/documents/ics168swarch (master) $ git commit -m "[initial project setup]" # on branch master # # initial commit # # untracked files: # (use "git add <file>..." include in committed) # # .gitignore.txt # assembly-csharp-vs.csproj # assembly-csharp.csproj # assembly-csharp.pidb # assets/ # ics168swarch-csharp.sln # ics168swarch.sln # ics168swarch.userprefs # library/ # projectsettings/ # temp/ nothing added commit untracked files present (use "git add" track) cheddar@cheddar-pc ~/documents/ics168swarch (master) $ git clone --bare . https://github.com/zarazha/swarch.git fatal: not create leading directories of 'https://github.com/zarazha/swarc h.git' cheddar@cheddar-pc ~/documents/ics168swarch (master) $
i searched solutions this, nothing found seemed have same cause getting. on appreciated!
it looks though have 2 issues here.
first, need .gitignore
file correctly limits files you're adding git. covered in tutorial linked, seems you've not followed correctly (as add
including files temp
folder). looking @ file list, seems you've named file .gitignore.txt
accident. remove file extension , try starting again (re-run git add
) , you'll better results.
the problem clone
second argument (the path "."
) incorrect. it's not required (the default .
anyway), , if want specify it, comes after repository, not before (see the git docs details - <repository>
comes before <directory>
).
so, think clone should instead this:
git clone --bare https://github.com/zarazha/swarch.git
Comments
Post a Comment