Tuesday, February 20, 2018

Git Bash Here

To open the Git Bash shell (you need to use it instead of just the command line where "git" leading commands will not be understood) right-click in a folder where you wish to associate code and pick "Git Bash Here" which will both be an option and open the shell if Git Bash is installed. At the GitHub web site, get to the splash page for the repository to clone and then click the "Clone or download" button which will expose some syntax for connecting to the repository. Copy the syntax to your clipboard and then type "git clone " at the command line of Git Bash followed by a paste of what you just copied (right-click in the shell and pick "Paste" as Ctrl-V won't work). Press the Enter/Return key and watch your folder get a new folder, nested inside of it. This other folder is the mouth of the file tree of source code you just pulled. Close Git Bash and then reopen it one folder down inside of the folder you just brought in. Herein, you may run Git commands normally. If you don't make the trip down a folder, you will get errors like:

fatal: Not a git repository (or any of the parent directories): .git

No comments:

Post a Comment