Support repository layouts where the git dir is customized
See original GitHub issueDescribe the bug
After moving the .git folder out of the working tree GitHub Desktop always reports “Never fetched” even after fetch occurs. Everything still works fine, just always see “Never fetched” message in GitHub Desktop.
Version & OS
OS: Windows 10 GitHub Desktop: 2.3.1
Steps to reproduce the behavior
- Open GitHub Desktop.
- Open GitHub command line (Ctrl+`).
- Type a command similar to the following example, depending on where you want to move the .git folder.
git init --separate-git-dir c:\git\example.git
- Git should give a reinitialized existing Git repository message. Once complete, exit the command line.
- In GitHub Desktop click the Fetch button. Fetch occurs but now always shows “Never fetched.”
Expected behavior
Should show last Fetch time.
Actual behavior
Always shows “Never fetched.”
Additional context
I’ve also tried adding a core.worktree value into the config and get the same problem.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
gitrepository-layout Documentation - Git
A Git repository comes in two different flavours: a .git directory at the root of the working tree;. a <project>.git ...
Read more >Repository Layouts - JFrog - JFrog Documentation
Repository Layouts allows you to take full control over the layout used by each repository and uses layout definitions to identify module ...
Read more >Setting up .git folder in a custom location - Stack Overflow
Also, instead of using a symbolic link, you can simply make .git a regular file and put a path in it: $ echo...
Read more >Git Repository Structure - GreenGeeks
This directory stores data of your Git objects. Likewise, this includes all the contents of the files you have ever checked in, your...
Read more >How to set up your GitOps directory structure
As explained in the previous section, your Git repository structure will depend heavily on how your organization is laid out. The repositories ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I get a similar issue - submodule in GitHub Desktop reports “never fetched”, but everything seems to work normally otherwise. I don’t use
--separate-git-dir
; at least I’ve never specified that option.@steveward Yes this is still happening. All my repositories are handled this way, but for testing purposes I did clone another existing repository without separating the dir and it does show a last fetched.
The issue for me only seems to only seems to happen on repositories that have a separate git dir, which right now is three different repositories I work in daily. Everything else has been working fine since I made the original post, but it has always said “Never fetched.”
Above testing done with latest current version of GitHub Desktop: 2.5.3.