B
B
BonBon Slick2016-10-06 16:49:27
git
BonBon Slick, 2016-10-06 16:49:27

How did Git break?

I used this guide, did everything the same, created a clean repository, a new one, created a folder, threw files there, iii, nothing came out.

console log:
[email protected] MINGW64 ~
$ git remote -v
fatal: Not a git repository (or any of the parent directories): .git

[email protected] MINGW64 ~
$ mkdir C:\Users\BonBonS\Desktop\folder

[email protected] MINGW64 ~
$ cd C:\Users\BonBonS\Desktop\folder

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder
$ git init
Initialized empty Git repository in C:/Users/BonBonS/CUsersBonBonSDesktopfolder/.git/

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git remote add origin https://[email protected]/BonBonSlick/test.git

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git remote -v
origin  https://[email protected]/BonBonSlick/test.git (fetch)
origin  https://[email protected]/BonBonSlick/test.git (push)

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add file.txt
fatal: pathspec 'file.txt' did not match any files

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add *
fatal: pathspec '*' did not match any files

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add .

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git commit
On branch master

Initial commit

nothing to commit

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add -A

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git commit
On branch master

Initial commit

nothing to commit

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add --all

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git commit
On branch master

Initial commit

nothing to commit

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add -u

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git commit
On branch master

Initial commit

nothing to commit

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin master


[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git push -u
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin master


[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git push -u origin
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin master


[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git push -u origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://[email protected]/BonBonSlick/test.git'

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git remote rm origin

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git init
Reinitialized existing Git repository in C:/Users/BonBonS/CUsersBonBonSDesktopfolder/.git/

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add file.txt
fatal: pathspec 'file.txt' did not match any files

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add .

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git commit
On branch master

Initial commit

nothing to commit

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git remote -v
 
[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git remote add origin https://[email protected]/BonBonSlick/test.git

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git remote -v
origin  https://[email protected]/BonBonSlick/test.git (fetch)
origin  https://[email protected]/BonBonSlick/test.git (push)

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add file.txt
fatal: pathspec 'file.txt' did not match any files

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git init
Reinitialized existing Git repository in C:/Users/BonBonS/CUsersBonBonSDesktopfolder/.git/

[email protected] MINGW64 ~/C:UsersBonBonSDesktopfolder (master)
$ git add file.txt
fatal: pathspec 'file.txt' did not match any files

...


And so on, for some reason it does not see file.txt , does not want to choose git add . therefore commit, what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
romy4, 2016-10-06
@BonBonSlick

всего лишь говорит, что в текущей папке нечего добавлять. особенно нет file.txt

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question