Skip to content

Creating batch script to start Git-SDK, is it possible to specify a specific $HOME directory? #736

@Edenwize

Description

@Edenwize

Setup

  • Type: Git-SDK 32 bit and up to date
  • Git: git version 2.8.0
  • Windows 7 32 bit

Details

  • Bash

Question

I am trying to create a batch script to start start_shell.cmd with a specific (i.e. alternate $HOME directory). Is this possible to do? Here is my script:

:
@echo off

set HOMEDRIVE=%cd:~0,2%
set HOMEPATH=\
set HOME=%HOMEDRIVE%

call "%APPDATA%\git-sdk\start_shell.cmd" -msys %*

This will set my $HOMEDRIVE, $HOMEPATH, and $HOME to D:, \, and /d respectively. The script does start the shell knowing the D drive. Unfortunately... for this to work with SSH is going to take more knowledge:

$ git push
Could not create directory '/home/public/.ssh...

Is there something I can do to make this happen? The only relavent information I have found is this article and not enough details exist for me to attempt it.

If their is time available for help, I would be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions