Montana-Media-Arts / 341-work

Resource repo and homework wiki for MART341-WebDev
https://montana-media-arts.github.io/mart341-webDev/
2 stars 2 forks source link

Git Bash and .md files incompatible? #21

Open PirreTaylor opened 7 years ago

PirreTaylor commented 7 years ago

I have been using Git Bash for my assignments, but as of late, I keep running into a recurring problem when it comes to updating .md files into a git repository. For example, during week 2's homework, when I would attempt to use the "git add" command to update the repository, it would throw out this error:

Untracked files: (use "git add ..." to include in what will be committed)

    .atom/
    .bash_history
    .gitconfig
    .oracle_jre_usage/
    .ssh/
    .swt/
    AppData/
    Contacts/
    Desktop/
    Documents/
    Downloads/
    Favorites/
    Links/
    Music/
    NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
    NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
    NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
    Pictures/
    Saved Games/
    Searches/
    Sti_Trace.log
    Tracing/
    Videos/
    ntuser.dat
    ntuser.dat.LOG1
    ntuser.dat.LOG2
    ntuser.dat{87a9ae80-4381-11e4-bc5b-14dae9a1bb60}.TM.blf
    ntuser.dat{87a9ae80-4381-11e4-bc5b-14dae9a1bb60}.TMContainer00000000000000000001.regtrans-ms
    ntuser.dat{87a9ae80-4381-11e4-bc5b-14dae9a1bb60}.TMContainer00000000000000000002.regtrans-ms
    ntuser.ini
    readme.md.md

nothing added to commit but untracked files present (use "git add" to track)

Using the "git add " commands with the uncommitted files then throws out this error:

fatal: Unable to create 'C:/Users/Tay/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.

Has this happened to anyone else? Am I missing something crucial? Many thanks in advance for any and all help.

timkolberg commented 7 years ago

From forum post here:

Try:

rm -f ./.git/index.lock

In your repository directory. The error message is rather explicit as to what causes it typically, so if you have no other git processes running (which is the normal case), go ahead and delete that

file.

Or if you're in windows Command Prompt it would be this:

In Windows, do this in the command prompt from the repo directory:

cd .git

then

del index.lock

michaelmusick commented 7 years ago

@PirreTaylor Where are you at on this?

It looks like you called git init in your home directory. (i.e. 'C:\Users\yourUserName'). Rather then in a specific sub-directory. (i.e. \341-webDev).

Can you confim this?