{"action":"created","issue":{"url":"https://api.github.com/repos/desktop/desktop/issues/4293","repository_url":"https://api.github.com/repos/desktop/desktop","labels_url":"https://api.github.com/repos/desktop/desktop/issues/4293/labels{/name}","comments_url":"https://api.github.com/repos/desktop/desktop/issues/4293/comments","events_url":"https://api.github.com/repos/desktop/desktop/issues/4293/events","html_url":"https://github.com/desktop/desktop/issues/4293","id":306987109,"number":4293,"title":"Problems with adding a bare repository ","user":{"login":"ysabri","id":16843765,"avatar_url":"https://avatars0.githubusercontent.com/u/16843765?v=4","gravatar_id":"","url":"https://api.github.com/users/ysabri","html_url":"https://github.com/ysabri","followers_url":"https://api.github.com/users/ysabri/followers","following_url":"https://api.github.com/users/ysabri/following{/other_user}","gists_url":"https://api.github.com/users/ysabri/gists{/gist_id}","starred_url":"https://api.github.com/users/ysabri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ysabri/subscriptions","organizations_url":"https://api.github.com/users/ysabri/orgs","repos_url":"https://api.github.com/users/ysabri/repos","events_url":"https://api.github.com/users/ysabri/events{/privacy}","received_events_url":"https://api.github.com/users/ysabri/received_events","type":"User","site_admin":false},"labels":[{"id":596683827,"url":"https://api.github.com/repos/desktop/desktop/labels/more-information-needed","name":"more-information-needed","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-20T18:28:47Z","updated_at":"2018-03-21T01:49:07Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nFirst and foremost, we’d like to thank you for taking the time to contribute to our project. Before submitting your issue, please follow these steps:\r\n\r\n1. Familiarize yourself with our contributing guide:\r\n\t* https://github.com/desktop/desktop/blob/master/CONTRIBUTING.md#contributing-to-github-desktop\r\n2. Check if your issue (and sometimes workaround) is in the known-issues doc:\r\n\t* https://github.com/desktop/desktop/blob/master/docs/known-issues.md\r\n3. Make sure your issue isn’t a duplicate of another issue\r\n4. If you have made it to this step, go ahead and fill out the template below\r\n-->\r\n\r\n## Description\r\nSo when I try and create a new repository in a directory that includes a bare repository, the app recognizes that the directory includes a git repository and asks me to add it instead. So far so good until I add the repository and the app tries to perform a git operation (I don't know which one exactly) and fails with \"fatal: This operation must be run in a work tree\". \r\n<!--\r\nProvide a detailed description of the behavior you're seeing or the behavior you'd like to see **below** this comment.\r\n-->\r\n\r\n\r\n## Version\r\n<!--\r\nPlace the version of GitHub Desktop you have installed **below** this comment. This is displayed under the 'About GitHub Desktop' menu item. If you are running from source, include the commit by running `git rev-parse HEAD` from the local repository.\r\n-->\r\n* GitHub Desktop: 1.1.0\r\n<!--\r\nPlace the version of your operating system **below** this comment. The operating system you are running on may also help with reproducing the issue. If you are on macOS, launch 'About This Mac' and write down the OS version listed. If you are on Windows, open 'Command Prompt' and attach the output of this command: 'cmd /c ver'\r\n-->\r\n* Operating system: Windows 10\r\n\r\n\r\n## Steps to Reproduce\r\n<!--\r\nList the steps to reproduce your issue **below** this comment\r\nex,\r\n1. `step 1`\r\n2. `step 2`\r\n3. `and so on…`\r\n-->\r\n1. Add a bare repository.  \r\n### Expected Behavior\r\n<!-- What you expected to happen -->\r\nThe app rejects adding it since it does not have a working tree or offers to do a local clone.\r\n### Actual Behavior\r\n<!-- What actually happens -->\r\nThe app adds it and fails to do a git operation repeatedly till the repo is removed. \r\n\r\n## Additional Information\r\n<!--\r\nPlace any additional information, configuration, or data that might be necessary to reproduce the issue **below** this comment.\r\n\r\nIf you have screen shots or gifs that demonstrate the issue, please include them.\r\n\r\nIf the issue involves a specific public repository, including the information about it will make it easier to recreate the issue.\r\n\r\nIf you are dealing with a performance issue or regression, attaching a Timeline profile of the task will help the developers understand the runtime behavior of the application on your machine.\r\nhttps://github.com/desktop/desktop/blob/master/docs/contributing/timeline-profile.md\r\n-->\r\nSo I looked at how the app decides if a path is a git directory. I understand how rev-parse --show-cdup is useful but it does not care if the repo is bare or not. I also tried to put a path into the url field of clone and the app complained that the destination already exists. I feel local clones is an enhancement that should be added as well. \r\n<!--\r\nAttach your log file (You can simply drag your file here to insert it) to this issue. Please make sure the generated link to your log file is **below** this comment section otherwise it will not appear when you submit your issue.\r\n\r\nmacOS logs location: `~/Library/Application Support/GitHub Desktop/logs/*.desktop.production.log`\r\nWindows logs location: `%APPDATA%\\GitHub Desktop\\logs\\*.desktop.production.log`\r\n\r\nThe log files are organized by date, so see if anything was generated for today's date.\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/desktop/desktop/issues/comments/374813615","html_url":"https://github.com/desktop/desktop/issues/4293#issuecomment-374813615","issue_url":"https://api.github.com/repos/desktop/desktop/issues/4293","id":374813615,"user":{"login":"batarmanrookie","id":37173113,"avatar_url":"https://avatars2.githubusercontent.com/u/37173113?v=4","gravatar_id":"","url":"https://api.github.com/users/batarmanrookie","html_url":"https://github.com/batarmanrookie","followers_url":"https://api.github.com/users/batarmanrookie/followers","following_url":"https://api.github.com/users/batarmanrookie/following{/other_user}","gists_url":"https://api.github.com/users/batarmanrookie/gists{/gist_id}","starred_url":"https://api.github.com/users/batarmanrookie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batarmanrookie/subscriptions","organizations_url":"https://api.github.com/users/batarmanrookie/orgs","repos_url":"https://api.github.com/users/batarmanrookie/repos","events_url":"https://api.github.com/users/batarmanrookie/events{/privacy}","received_events_url":"https://api.github.com/users/batarmanrookie/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T01:49:07Z","updated_at":"2018-03-21T01:49:07Z","author_association":"NONE","body":"Because  at begening i  was hack by this fucking shift and im not the best in english and i learn all by myself 😳👻💩lol\r\n\r\nEnvoyémy de mon iPhone\r\n\r\nLe 20 mars 2018 à 19:19, Brendan Forster <notifications@github.com<mailto:notifications@github.com>> a écrit :\r\n\r\n\r\nSo when I try and create a new repository in a directory that includes a bare repository, the app recognizes that the directory includes a git repository and asks me to add it instead.\r\n\r\nTo confirm I understand the issue, are you using git init --bare to create a Git repository and then adding that folder to the app?\r\n\r\n$ cd test\r\n$ mkdir repo\r\n$ cd repo\r\n$ git init --bare\r\nInitialized empty Git repository in C:/Users/shiftkey/src/test/repo/\r\n$ ls\r\nconfig  description  HEAD  hooks/  info/  objects/  refs/\r\n\r\n\r\nI suspect there are some assumptions in the app around the presence of a .git directory within the folder that you provide. @ysabri<https://github.com/ysabri> can you tell me more about your use case here, and why you're avoiding initialising the repository in the typical way?ok il look out for That tomorroy for Now  its over  ty  and yes il try to hck out with new learn and more powerfûl computer and apps but i think i have not finish and im a weird guy so il’ i have to show all my code my porn and my Life the y can go hard  i  bélière in Karma! 🤪🤟👍\r\n\r\n— lolll  yes first Time i fond c appli in my admin Microsoft top’ and ôta how i Wadjda discourer thaïs for thé rest i dont trust with un cause  for me you r thé crew theu want  fuck my lif e why and you want i sign the prof of how im wreck by you?\r\nYou are receiving this because you are subscribed to this thread.\r\nReply to this email directly, view it on GitHub<https://github.com/desktop/desktop/issues/4293#issuecomment-374790156>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Ajc3eVqHT39np0hCHjWlxBIqu6K4dkjVks5tgY6HgaJpZM4SybSr>.\r\n"}}
{"actor":{"display_login":"batarmanrookie"}}