Skip to content

Should Desktop Electron import data from Desktop Classic? #186

Closed

Description

@joshaber

We talked about this a bit at the mini-summit and in #184.

Should Desktop Electron import Desktop Classic's data? The most meaningful bits are:

  • Tracked repositories.
  • Logged-in users.

Activity

  1. pmn commented on Jul 29, 2016

    @pmn

    What would happen if we didn't build migrations for these bits? In fact, if we said "Hey, this is the new Desktop, it's different underneath. We'd like you to download the installer and set it up separately."?

    We have had a pretty good track record of updating things automatically for people, and I don't feel like people have upgrade fatigue by having to go through a 💩 process every time a new version comes out. It feels like we'd save a lot of time (and potential headaches) by drawing a line in the sand between old and new applications and requiring people download and set up again. Thoughts?

  2. joshaber commented on Jul 29, 2016

    @joshaber
    ContributorAuthor

    I broadly agree. I think this is where how we market it matters.

    Maybe this decision is one we can put off until we have a better idea of our timeline. Then we can make the decision of whether it's worth the time.

  3. haacked commented on Aug 9, 2016

    @haacked
    Contributor

    One thing to consider, we could update the existing apps to make the migration easier if we decide to go this route. For example, maybe the last version of the existing apps would export the data in a known location in a nice format and the new app would pick it up.

  4. joshaber commented on Aug 10, 2016

    @joshaber
    ContributorAuthor

    Yeah that's a good point. We'd need to be careful about user credentials but that could be an easy way to import repositories.

  5. changed the title [-]Should TNG:9000 import data from Desktop Classic?[/-] [+]Should Desktop Electron import data from Desktop Classic?[/+] on May 15, 2017
  6. kexic commented on Jul 25, 2017

    @kexic

    We would like to use the new GitHub Desktop Beta, but we have almost 200 independent projects that we follow. Without a clone discovery mechanism we can't begin to help out. Please consider at least a directory "rediscover" option where Beta looks in the default directory for newly added folders.

    I understand that the connection to the online repositories would take further effort, but for those of us who have been using the desktop extensively, re-cloning our code library may not be a realistic request.

    +1 for existing clone foler importing

  7. j-f1 commented on Jul 25, 2017

    @j-f1
    Contributor

    You can drag and drop the clones into Desktop, @kexic.

  8. joshaber commented on Sep 15, 2017

    @joshaber
    ContributorAuthor

    Our current answer here is no.

    We can revisit this later if we want, but right now there's no action to be taken.

  9. haacked commented on Sep 15, 2017

    @haacked
    Contributor

    Perhaps we should at least consider documentation or a FAQ answer. For example, it might not be clear to folks that if they have a bunch of clones in the same directory, they could select all their folders and drag them en masse into the new Desktop.

    For most users, this is a fine migration strategy because Desktop clones everything to the same folder. So if you don't constantly tweak things, it works great.

  10. joshaber commented on Sep 15, 2017

    @joshaber
    ContributorAuthor

    That's a great point 👍 I'll raise that on the docs tracking issue.

  11. makhnovskiy commented on Sep 29, 2017

    @makhnovskiy

    Had to search on how to import from previous version. This helped. Would definitely be easier with a migration utility, initial launch ability to import repo's or quick message on how to migrate via drag and drop on your homepage https://desktop.github.com/. Either way, thanks for your hard work!

  12. danilaml commented on Oct 3, 2017

    @danilaml

    Is there at least some way to quickly get the list of dirs of all repos known to the old GitHub for Windows? I have quite a few repositories, each stored in their specific location(s), so even with drag'n'drop migrating them to new app is not a pleasant prospect. I'd have to manually go through all the repos, open them in explorer and import into a new app.

    So yeah, at least the option to import all repositories from the old app would be really nice. And should work for most cases without any additional problems, assuming that you use the same GH account for all of them.

  13. makhnovskiy commented on Oct 3, 2017

    @makhnovskiy

    @danilaml Try searching for all .git files with unique parent folders. Not sure how you would go about with Windows, but Mac or Linux, pretty easy. find / -name ".git". Still a manual drag and drop operation per each single repo... :(

    https://stackoverflow.com/questions/2020812/how-can-i-view-all-the-git-repositories-on-my-machine

  14. 1 remaining item

  15. j-f1 commented on Oct 3, 2017

    @j-f1
    Contributor

    I’m pretty sure you can also drag and drop multiple folders at once into Desktop, and it should add them all.

  16. makhnovskiy commented on Oct 3, 2017

    @makhnovskiy

    @danilaml Good point... Would be awesome to have that auto migrate tool.

  17. gingerbeardman commented on Mar 15, 2018

    @gingerbeardman
    Contributor

    Well this kind of sucks.

    No note in the classic app that there was a new one available.
    No way to migrate.

    I think you could have made this easier for your customers.

    Your thoughts now @pmn given your old thoughts in #186 (comment)

  18. pmn commented on Mar 16, 2018

    @pmn

    Hiya @gingerbeardman. I'm sorry that you were surprised by the new version of Desktop and the lack of a migration path between old and new. That sucks, and I know it's frustrating.

    I don't work with the Desktop team at GitHub any more (or at GitHub at all 😅). However, https://desktop.github.com has been updated for awhile to tell people about the new application. Multiple applications were replaced by the new GitHub Desktop (GitHub for Windows, and GitHub for Mac, specifically), and I think the decision to not offer an upgrade path was a good one -- the new Desktop was rewritten from the ground up, and there were / are too many opportunities to get migration wrong, putting people's setup in a bad state. If I were still at GitHub, I'd continue to advocate against an automated migration between the applications but do agree that some kind of notice would be nice. cc'ing @haacked, who will know the right folks at GitHub to decide if and what to do here.

  19. gingerbeardman commented on Mar 16, 2018

    @gingerbeardman
    Contributor

    I guess things changed a lot since 2016

  20. pmn commented on Mar 16, 2018

    @pmn

    Although I have no means to do anything about it; how would you have wanted a migration feature to work? What would have been migrated? (And if the answer is 'everything', please enumerate so we're on the same page as to what that means 😀). Is your primary concern discovering existing git repos in a working directory, something else?

  21. gingerbeardman commented on Mar 16, 2018

    @gingerbeardman
    Contributor

    Yes, if it just imported the list of repos that would be enough.

    To import nothing is just a big 🖕 and seems quite arrogant from the outside, as you implied in 2016

  22. orangebowlerhat commented on May 15, 2018

    @orangebowlerhat

    I don't have anything to add to this conversation except backing up gingerbeardman's description of the situation. My solution is going to be not using the new app until I see specific evidence that its worth the time to find all those different folders. The previous app is still available and still functioning so there is no reason to lose the time and deal with any possible problems this might cause.

  23. shiftkey commented on May 15, 2018

    @shiftkey
    Member

    Thanks for all the feedback on this!

    When this was first raised I took a shot at seeing what would be possible on short notice to cover this gap, as it would have been cool to get this in, but it became a bigger task than I expected and still required a lot of work to get it up to scratch for shipping.

    The Technical Details

    Classic Desktop on macOS stores the tracked list of repositories in a plist file, so we'd need a way to read those files into memory. On Windows the list of repositories are stored in a SQLite database. Same deal.

    Theoretically we could poke at these sources to see what you were tracking in the application, cross-check with what you're currently tracking in the new Desktop version, and show only those that aren't in the list.

    But I hit a wall at the extracting step. I was spiking this out on macOS and I got really confused by how to traverse plist files from a library like bplist-parser to extract the tracked repositories, and the examples really didn't help - someone who knows more about plists than I and can figure out how to traverse the classic Desktop file at ~/Library/Application Support/GitHub for Mac/localRepositories.plist from Node would be a great help here to unblock this.

    I didn't get around to parsing sqlite files for Windows, but I'm less concerned about this given it's a relational database underneath.

    The Prompt

    Imagine that the user has both the new and existing application installed. If we could detect that they've been using the new application for a while, and haven't returned to the old application, we could show a dialog like this to help them complete the migration.

    This is all dummy data, for the reasons above. There might also be an alternative way to manually trigger this flow, I'm not really fussed about how the user would encounter this.

    One concern I have about this is introducing two new dependencies for just this flow. bplist-parser is a 11kb script which should minify down nicely when we bundle, but I didn't get around to properly looking at an sqlite library for consuming from Node on Windows - most of the options I saw were native modules, which requires targeting the version of Node embedded in Electron.

    Another concern I have here is about tracking usage from outside the app - how could we track that you haven't touched Classic Desktop after X days - poking at data files might be the best bet here, but it doesn't feel very reliable.

    Migration Scripts

    If we feel that we can get avoid a full UX for importing repositories (which requires more development and QA work due to the dependency on having both installed), there might be a way to share a script or tool to import repositories from outside Desktop, using the github command line interface. If that's more appealing, and we can solve how to enumerate repositories for each OS, this becomes easier to tackle out-of-band.

    Here's a hypothetical setup:

    $ npm install -g github-desktop-migration
    $ github-desktop-migration list-missing --file historic.txt
    20 missing repositories found and logged
    $ less historic.txt
    /Users/shiftkey/src/diary
    /Users/shiftkey/src/probot
    /Users/shiftkey/src/vscode
    ...
    # edit file here to drop repositories you're no longer using
    $ github-desktop-migration import --file historic.txt
    10 repositories added to GitHub Desktop

    The only downside to this approach is that we don't currently have a way to get the list of tracked repositories from in the app - these are in an IndexedDB instance inside the data directory. Maybe something like github list --json command here would help?

    But the upsides (install a tool, run it, uninstall the tool, live a happy life) here are also significant.

  24. j-f1 commented on May 15, 2018

    @j-f1
    Contributor

    That hypothetical setup could be shortened by using npx.

  25. locked as resolved and limited conversation to collaborators on Jul 17, 2018
  26. unlocked this conversation on Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions