I must admit that I'm totally confused about initialising Git - though it's not for the first time really.
I first downloaded original Git bash and made a repository something at C:\xampp\htdocs\something
. At the same time, I created something repository under my profile. I thought they might link together then (after I log in) - such naivity was soon punished.
Then I realised that this Git bash really doesn't like me, so I downloaded standard "Git for windows".
I deleted .git
in C:\xampp\htdocs\something
, and I deleted the online version of the repository. I also looked at Documents\GitHub\
for something
folder, but it's not there.
But well, sounds like I didn't delete it enough - have a look:
So where else does Git store data about existing repos? Will I have to pick different name just because of this?
Can I list the repositories to see why it happens?
Initialising repo through console (success)
Possible workaround is using the Git shell console:
cd C:\xampp\htdocs\something
git init
Initialized empty Git repository in C:/xampp/htdocs/rimedit/.git/
Pushing with GUI application (failed)
But using console is a workaround, not an answer. Also I still can't push because of this:
Pushing with console (failed too)
To piss me of as much as possible, this is what console throws upon pushing:
remote: Repository not found.
fatal: repository 'https://github.com/Darker/rimedit.git/' not found
Note that the error is the exact opposite to the one I get with the GUI application.
Deleting cache
Git stores some cached data and account information at %APPDATA%\GitHub\
(thanks Chris). Deleting the cache did not solve the problem - it appears that it might be server-sided.
Finally a solution (not an answer)
The Repository not found.
in the console was simply fixed by creating the repository on the server once again. After this, I'd get this for push:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/Darker/rimedit.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
So I wanted to pull, but again an error:
* [new branch] master -> git/master
You asked to pull from the remote 'git', but did not specify
a branch. Because this is not the default configured remote
So, after all, I have found this post. I edited my config to look like this:
[remote "git"]
url = https://github.com/<account name>/<repo name>.git
fetch = +refs/heads/*:refs/remotes/git/*
[branch "master"]
remote = git
merge = refs/heads/master
After this, all I needed was to pull
the readme.md
and then push
all my data.