Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Auto-fetch? #842

Open
Open

Description

@danielbayley

I recently implimented this in git-plus, but wondered if it might be an appropriate feature here?

Tower and GitKraken clients both auto-fetch periodically.

Activity

  1. adrian3H commented on Jun 28, 2017

    @adrian3H

    Also - clicking 'fetch' doesn't retrieve full list of branches in repository (origin). Currently there doesn't appear to be a way to check out a branch via the github package in Atom.

  2. simurai commented on Mar 29, 2018

    @simurai
    Contributor

    Here some thoughts about enabling auto-fetching. They're mostly questions. 😉

    How often?

    • git-plus has an option to choose between 0-60 minutes. 0 means disabling auto-fetching
    • GitHub Desktop seems to auto-fetch every 5-10 minutes???

    Auto-fetch when doing certain actions?

    Auto-fetching could also be tied to doing certain actions. For example:

    • After opening a repo (or adding a repo to a current project).
    • After switching branches.
    • After committing.
    • After a computer comes back from sleep. If that's possible to detect? Otherwise maybe after being idle for a while. Like when coming back from lunch or the next morning.
    • More?

    Because in these situations, it would be a good time to pull (if you're behind). Periodically auto-fetch could be distracting if you're in the middle of coding and you see the spinner and then the counter update.

    image

    And then you're in this conflict: "Should I first finish and commit or go check on github.com what the changes are?" 🤔

    Option to disable?

    Have an option to disabling auto-fetching in case you are tethering with your phone and wanna save data. #1308 (comment). There are also apps like TripMode to control access outside of Atom.

  3. mattmattmatt commented on Mar 30, 2018

    @mattmattmatt
    Contributor

    @simurai I think all of these are good points in time to auto-fetch without being distracting. 👍 I personally like a periodic auto-fetch as well, but I can definitely see that mental conflict once one realizes that "there are changes on remote", so that might not be for everyone.

    From a quick web search, it seems to be possible in Electron to detect when a computer comes back from sleep. I have no idea how hard it would be to get such information into the GitHub package, but in theory this possibility seems to exist.

    I threw together a quick hack of what a ⚙️Settings sub-screen could look like:

    image
    One could easily enable/disable all of auto-fetching with one click, or go into more details per action.

    A simplified version could look like this:

    image

    I'm aware that too many settings can be overkill, so keeping it simple might be a good idea. But as not all users might want to auto-fetch for bandwidth reasons (I couldn't quite find any data about how much an empty fetch costs), there should probably exist an option to turn the whole feature off (would it be off by default?).

  4. simurai commented on Apr 6, 2018

    @simurai
    Contributor

    I'm aware that too many settings can be overkill, so keeping it simple might be a good idea.

    😂 Yeah, being a little bit opinionated should be fine. I like the two categories that can be toggled individually. 👍

    would it be off by default?

    Introduce auto-fetch by being off by default? To avoid unpleasant surprises. We can always turn it on at a later point if we feel strongly about it.

  5. ThatXliner commented on Jan 18, 2021

    @ThatXliner

    What’s the status on this? An auto-fetch is a good idea.

    1. When I forget to fetch, I usually get surprised with some merge conflicts, thus creating unnecessary commits and making the git history less clean
    2. VS Code has this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions