Open mkungla opened 5 years ago
I had atom open in background and did all the git magic from cli. Some point atom suddenly recognized that it has existing repo open and started behaving as expected. Dunno can that be debugged or this issue can be closed!?
Thanks for the update @mkungla! I was unable to reproduce on Fedora 27 after installing 1.36.0 via the .rpm file - do things look ok if you open some other git repository? If so, then I think we can probably close for now, we can always reopen if you start hitting this error again.
Im getting the same thing on new install on Ubuntu. Xenial Atom 1.38.2 x64 Electron 2.0.18 Chrome 61.0.3163.100 node v8.9.3 github 0.29
I didnt see anything user specific settings in the github settings panel in atom.
It seems that it is some unidentified bug then! So now there is need to find a way how to reproduce that.
I ran into something similar (maybe related?) but found a strange workaround.
Atom: 1.39.1 Git: 2.22.0 MacOS 10.14.5
Unable to initialize git repository in /Users/lindsey/github/projectname
This directory already contains a git repository
6. I'm still able to work with the repo via CLI at this point.
7. Configuration files look as expected.
8. Create a file at the top of the tree called "test.txt." (/Users/lindsey/github/projectname/test.txt)
9. When viewing my test file, the git pane shows my repo. I can use the git functionality at this level just fine.
10. Navigate back to the files that I'm working on (/Users/lindsey/github/projectname/development/subfolder/subfolder...) and the "Create Repository" pane is there. Save changes to files.
11. Open the tab with my test file... changes to the files show, I can stage, commit, and push them just fine.
For right now, I'm just pulling up that test file so that I can use the git functionality. It's not ideal but it's better than having to use CLI for everything.
Something about it not recognizing the repo when in subfolders in the tree?
EDIT: I can confirm that this exact thing happens with other projects in Atom. It's not isolated to this single project repo.
Atom: 1.40.0 Git: 2.17.1 Ubuntu 18.04
I've been seeing this issue, too. If a file's pane is active (i.e. has keyboard focus) in any file that was included in git at the time that I opened Atom, I see the correct git panel. If I'm in a file that was added later, I see the blank "Create Repository" panel. Because of this, I usually have to quit Atom and restart it whenever I add a file to the git repository. Quitting and restarting makes it recognize what git already knows: that the file is included in git.
This smells very strongly of an out-of-date initialization—Atom must be reading the git metadata at startup, perhaps when a project window is opened, and not thereafter. At least, it doesn't update the set of git-tracked files. (It does update the branch name, Fetch/Pull/Push button, and number of unstaged changes indicstor at the bottom right.)
- Create a file at the top of the tree called "test.txt." (/Users/lindsey/github/projectname/test.txt)
- When viewing my test file, the git pane shows my repo. I can use the git functionality at this level just fine.
I can confirm - creating an arbitrary file in the directory seemed to wake up the GitHub panel, which then asked for the authentication token.
NB. I had recently updated OS to Mojave and other web searches told me I needed to re-add git.
Prerequisites
Description
When opening existing repo in latest atom Create Repository panel is shown.
Steps to Reproduce
Expected behavior: Atom to recognize git repo
Actual behavior: Atom does not recognize git repo and prompts to Create Repository which results error
Unable to initialize git repository in $PROJECT_PATH, This directory already contains a git repository
Reproduces how often: 100%
Versions