'git' is not recognized as an internal or external command [Windows] - github

Not a duplicate of
'git' is not recognized as an internal or external command
I've set up my github repository, downloaded Github Desktop, but I can't figure out how to upload files to the repo.
Here are Github's instructions for me
I've done the "quick set up", and have set up github Desktop on my computer. However, I can't get the command line repo setup to work. Whenever I type out a git command, it gives the above error. I've tried to research why this happens, but the only relevant source (linked above) gave instructions regarding a past version of the github app.
I know this is probably very simple, but I'm quite new and can't find out what to do. Any help is appreciated.

If somehow the GitHub Destop did not add an internal Git to your PATH, you can do so manually with the latest Git for Windows release.
Uncompress the archive PortableGit-2.15.0-64-bit.7z.exe anywhere you want and add it to your PATH (as I do here), then launch GitHub Desktop.

Related

GitHub Desktop - how to change default storage directory?

I am using GitHub Desktop on Windows, and want to change the directory where cloned repositories go by default (currently %USER%\Documents\GitHub\).
I have looked at this question from 8 years ago in which OP is using the GitHub for Windows GUI, but that's apparently not the same as GitHub Desktop because none of the answers work for me. Alt-T does nothing, and I can't find default storage directory in global options or in repository settings. Also, the shortcut to GitHub Desktop starts in a different directory altogether, so modifying that would be no use.
I know that I can use the command line to git clone to any directory, but it would just be nice if one could configure the desktop version to do that as well.
Does anyone know of a way to change the default directory for cloned repos that works in the current version of GitHub Desktop?
The way to do this now is to change the folder when cloning it in the GUI:
Click on the repo to clone, then change the initial path in the 'Local path' area. After that, it should use that location as the default. Any easy way to get the folder you want is to copy it from the address bar in a file browser:

When using the builtin settings sync on vscode, where are the actual files?

I'm using the builtin setting sync with vscode (not the extension), I've successfully synced, yet I do not see the actual files anywhere through github. Do these files exist somewhere that is accessible through github?
From what I can tell the files are not accessible through github, obviously they are at the root of the repo in .vscode/, but I'd love to actually see the backed up version.
The way I handled this with vim was to add a source command in the .vimrc, then link that to it's own github repo.
I guess I'll have to just trust that github and vscode have it handled

Blogdown - window to stage and commit changes no longer appears

I recently created a website using blogdown and now hosting it on a GitHub repository and netlify to deploy. When I set it up, I followed the directions to clone my GitHub repository to be able to commit files using the git version control. So making changes within Rmarkdown and then committing them to my GitHub repository was easy.
However, when I connect to the project now, the window where I can commit changes does not appear. That is, I no longer have the option to commit changes within R studio. My guess is that the connection between the terminal and GitHub was changed/removed? Does anyone know how to re-establish this? I've looked up the syntax to use in the terminal, but I couldn't find a similar problem - that is, re-establish the connection between my GitHub with an already existing project already on my desktop.
Posting an answer to this question in the case others have a problem. It was an issue with MojaveOS. You have to re-install command line tools in the terminal.
xcode-select --install
Doing this, the version control now works to commit files to my github repository.

Newbie Unable to clone repo

I've never used a VCS before and I'm attempting to set one up now.
I'm doing some Game Development with Unity3d. At first I googled how to set up VCS for Unity; and I found this: http://www.gamasutra.com/blogs/BurkayOzdemir/20130303/187697/Using_Unity3D_with_external_VCS_Mercurial__Bitbucket_step_to_step_guide.php
I followed it until it came time to clone the repository from within the hgTortoise workbench. When I hit the clone button after copying and pasting the URL to my repo from the BitBucket.org website I received an error: "Repository Git clone https:://username#bitbucket.org/username/projectName.git not found code: 255" and I do understand what an HTTP 404 error is.
Anyone who has used the internet knows it means the page could not be found.
I created this repo as private; is that why it could not find my repo?
Then I proceeded to follow the instructions at BitBucket's "BitBucket 101" help page. I installed Git, had already created a BitBucket account and repo, and the instructions which followed.
I stopped at the point where the help page said to enter some command line things in to Git Shell. I'm running Windows 8.1 and searches have shown me that particular program doesn't exist on this PC.
Am I doing this correctly? What am I doing wrong? All I need is to set up a VCS.
Git and Mercurial are 2 different distributed version control packages. They both use a command line interface. TortoiseHG (the package referred to in the step-by-step you linked to) is a GUI extension that's only used for Mercurial. (HG is the chemical symbol for Mercury, get it?!)
Bitbucket is an online repository that can host either Git or Mercurial repositories.
It looks like you created your repository on Bitbucket as a Git repo and not a Mercurial repo. Just delete the repo on Bitbucket (make sure you have a good copy of your source code) and recreate it as a Mercurial repo. Then work with TortoiseHG as instructed in the step-by-step.
The fact that it's a private repo doesn't matter. That just means it will only be visible to you (vs. everyone) and will require a password to push and pull changes via https or ssh.
Well, first of all, it seems that the tutorial that you seem to be using is based on using Mercurial instead of Git.
If you're comfortable with diving into the command line, you can download TortoiseHG, which is a Windows shell extension: http://tortoisehg.bitbucket.io/
However, there's nothing wrong with using SourceTree as well, which is a GUI-based interface for dealing with both Git and Mercurial repositories: https://www.sourcetreeapp.com/
FYI, if you downloaded Git for Windows, it should've provided you with a terminal called Git Bash that you can use for Git commands.

Can't commit with Github Windows, no reason given

I have been forced to use other apps, and the command line since Github for Windows is not allowing me to commit changes. I would like to understand what's the problem, but I simply get a prompt with this message:
Commit failed
Failed to create new commit
Then, it gives me the option of go to the Git Shell or to cancel. While I am not an expert with the terminal, I am able to make commits when I choose to go to the Git Shell (or to any other application for that matter).
I am using Github 2.0.5 on Windows 7.
After an exchange with the Github for Windows developers, the issue has something to do with Windows inability to work with paths when they're too long. The node_modules folders generated by Node.js is the culprit of this issue in my particular case.
However, the node_modules folders in my repository are gitignored. The fact that even when gitignored they create a problem in Github for Windows means the developers have to address the situation.
I expect a response or a patch from the developers soon. They have been very helpful. In the meantime, I am using SourceTree as my Windows Git GUI.