Skip to content

Launch via command line for current working directory #2775

Closed

Description

@jpoehls

Command line integration

I'd like to be able to launch the commit/changes UI for my current working directory from the command line.

E.g.,

C:\repos\my project> GitHubDesktop
# Launches GitHub Desktop to the Changes UI for me to commit my changes

My typical workflow is to do most git operations from the command line but launch a GUI for commits since GUIs are quicker for selecting specific files and lines for the commit.

I use GitExtensions right now which lets me launch gitex commit to quickly commit files in my working directory. I'd like to replace GitExtensions with GitHub Desktop in this same workflow.

Activity

  1. j-f1 commented on Sep 19, 2017

    @j-f1
    Contributor

    Try github . 😃

  2. jpoehls commented on Sep 19, 2017

    @jpoehls
    Author

    Thanks! That's mostly what I want. I do have a couple nitpicks based on a few minutes of testing that though:

    1. github . from a sub-directory in my git clone opens a prompt to add a new local repository instead of detecting the local repository I've already added.
    2. github (without the dot) should have the same behavior as github . IMO
  3. j-f1 commented on Sep 19, 2017

    @j-f1
    Contributor

    Thanks! I’m working on a better CLI in #2372, and I’ll post your ideas over there!

  4. jpoehls commented on Sep 19, 2017

    @jpoehls
    Author

    Thanks! I'll go ahead and close this issue out then.

    For anyone finding this in the near future, I've added this PowerShell function and alias in my profile to get the behavior I wanted.

    function Invoke-GitHub {
        $gitRoot = & git rev-parse --show-toplevel
        if ($LASTEXITCODE -eq 0) {
            & (Join-Path $env:LOCALAPPDATA "GitHubDesktop\bin\github.bat") $gitRoot
        }
    }
    Set-Alias github Invoke-GitHub -Force
    
  5. shiftkey commented on Sep 22, 2017

    @shiftkey
    Member

    @jpoehls yeah, that first issue sounds like a bug. I've opened #2832 to track it, so hopefully you won't need that workaround in the future...

  6. locked as resolved and limited conversation to collaborators on Jul 19, 2018
  7. unlocked this conversation on Sep 27, 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

    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