Skip to content

Connection to repository broken after installing Git #6593

Closed

Description

@Migdalin

Description

Push to repository from GitHub Desktop failed to arrive at the repository, though no errors were generated, and the UI claims that the change was pushed without issue.

Version

  • GitHub Desktop: 1.5.1
  • Operating system: Windows 10

Steps to Reproduce

  1. Install GitHub Desktop.
  2. Create a repository.
  3. Merge and push files into the repository.
  4. Pull the repository onto a second machine.
  5. On the first machine, install Git. (You will be prompted to do this, "if you want to merge a file manually.")
  6. Now, merge changes and push to the repository from machine Space #1.
  7. Return to machine Update some things #2. Fetch.
  8. See that the changes weren't fetched. Look at the repository online. See that the changes don't appear.

Expected Behavior

  1. Require that users have Git installed locally before installing GitHub Desktop. Or, at least forcefully warn them that operations like manual merging will be unavailable. I don't know for sure that this is what broke the connection, but requiring that Git be installed still makes sense. Merging changes is a standard operation. Before the desktop can claim to be installed correctly, the desktop should support merging.
  2. During installation, warn users that, while Git will let them select various editors, GitHub Desktop only supports Atom. Same rationale as above.
  3. If the installer doesn't require that Git be installed first, handle situations where it is installed afterwards. For sure, don't pretend that a push to the repository worked when it didn't.

Actual Behavior

A push to the repository appeared to succeed, but the files never made it there.

Additional Information

github desktop screenshot
github online screenshot

Logs

2019-01-11.desktop.production.log

Activity

  1. steveward commented on Jan 12, 2019

    @steveward
    Contributor

    Thanks for the report @Migdalin. It looks like in this specific situation the pull operation failed due to merge conflicts that needed to be resolved:

    2019-01-11T15:00:30.612Z - error: [ui] `git -c credential.helper= pull --no-rebase --progress origin` exited with an unexpected code: 1.
    Auto-merging DataModel/sum_tree_wrapper.py
    CONFLICT (content): Merge conflict in DataModel/sum_tree_wrapper.py
    Automatic merge failed; fix conflicts and then commit the result.
    

    which then caused the push operation to fail since you had changes on the remote repository that needed to be pulled in:

    2019-01-11T15:02:50.437Z - error: [ui] `git -c credential.helper= push origin master:master --progress` exited with an unexpected code: 1.
    To https://github.com/Migdalin/PrioritizedReplay.git
     ! [rejected]        master -> master (non-fast-forward)
    error: failed to push some refs to 'https://github.com/Migdalin/PrioritizedReplay.git'
    hint: Updates were rejected because the tip of your current branch is behind
    hint: its remote counterpart. Integrate the remote changes (e.g.
    hint: 'git pull ...') before pushing again.
    hint: See the 'Note about fast-forwards' in 'git push --help' for details.
    

    Once you resolve the merge conflicts and pull in the remote changes you should be able to push again. If you have any issues with that, please let me know.

    Require that users have Git installed locally before installing GitHub Desktop. Or, at least forcefully warn them that operations like manual merging will be unavailable.

    I'm not sure I fully understand the issue you are describing with regards to Git needing to be installed. GitHub Desktop bundles Git with the application, so you do not need to install Git unless you specifically want to use Git from the command line. When you say 'manual merging' are you referring to merging using the command line vs. directly in GitHub Desktop? If you could provide some more clarification around the issue here that would be helpful.

    During installation, warn users that, while Git will let them select various editors, GitHub Desktop only supports Atom. Same rationale as above.

    GitHub Desktop does support more editors than Atom -- you can find the full list here. We're going to work on improving the messaging in GitHub Desktop to let users know more editors are supported.

  2. added
    more-info-needed
    on Jan 12, 2019
  3. Migdalin commented on Jan 12, 2019

    @Migdalin
    Author

    If multiple editors are supported, then improved messaging sounds like a really good idea. I tried following the link to the full list, but it gives me "page not found." Anyway, I installed Notepad++, because the Git installer listed it as a supported editor, but Desktop still appears to insist on Atom or nothing.

    install atom screenshot

  4. shiftkey commented on Jan 14, 2019

    @shiftkey
    Member

    Anyway, I installed Notepad++, because the Git installer listed it as a supported editor, but Desktop still appears to insist on Atom or nothing.

    We can't support Notepad++ currently - see #4120 for more details about that issue

  5. steveward commented on Jan 15, 2019

    @steveward
    Contributor

    @Migdalin sorry about the broken link -- I've updated it. For reference these are the currently supported editors on Windows:

    Atom
    Visual Studio Code - both stable and Insiders channel
    Sublime Text
    ColdFusion Builder
    Typora
    SlickEdit
    JetBrains WebStorm

    Are you still having any problems using GitHub Desktop? If so, let me know how I can help.

  6. Migdalin commented on Jan 16, 2019

    @Migdalin
    Author

    I have Visual Studio 2017, the free version, but I guess that's not the same as Visual Studio Code. Probably I'll get Atom the next time I need to merge. For now, I'm making changes on one machine only, so I don't have to worry about merging. Thanks for your help.

  7. steveward commented on Jan 16, 2019

    @steveward
    Contributor

    I have Visual Studio 2017, the free version, but I guess that's not the same as Visual Studio Code.

    Visual Studio Code is a text editor similar to Atom, whereas Visual Studio is a full IDE that provides a lot of other features. They do share some features like syntax highlighting, though. I would definitely recommend checking out VSCode or Atom if you are looking for a text editor to use. I'm going to close this issue out, but let us know if we can help with anything else!

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

    more-info-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions