git-receive-pack: command not found in Windows

后端 未结 4 1581
忘掉有多难
忘掉有多难 2021-01-12 08:24

Wondering how to fix this problem in Windows ?

When i try and use the command \"git push origin master\" I get

git-receive-pack: command not

4条回答
  •  清歌不尽
    2021-01-12 08:56

    I had a similar problem when trying to execute a git pull from another Win-7 machine. Here's what I did:

    • In order to interact with remote repositories via Git, the Git directories need to be added to the REMOTE machine's Windows PATH environmental variable (this should be done for any Windows machine running Git and needing to clone, push, or pull)
    • Git directories to add (so far):

      ..\git\bin, ..\git\libexec\git-core, ..\git\cmd

    • To modify the Windows-7 path, use the following:

      Click Start, then right-click on "Computer" and select "Properties", On the left panel, select "Advanced system settings", In the System Properties dialog, click on the "Environmental Variables…" button, Select "Path" from the "System variables list", and click the "Edit" button

    Add the needed paths to the end of the existing Path string using a semi-colon as the delimiter. Note: the path needs to be specified from the disk root (e.g. C:).

提交回复
热议问题