question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support repository layouts where the git dir is customized

See original GitHub issue

Describe 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

  1. Open GitHub Desktop.
  2. Open GitHub command line (Ctrl+`).
  3. 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

  1. Git should give a reinitialized existing Git repository message. Once complete, exit the command line.
  2. 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:open
  • Created 4 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sgbairdcommented, Aug 13, 2020

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.

1reaction
Computerhopecommented, Aug 18, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found