- Using Portable Git
- 20 Dec 2020 07:46:29 pm
- Last edited by KaluW_ on 06 Feb 2021 01:25:57 am; edited 1 time in total
I am currently programming a project in C for the TI84CE. I want to be able to use Git to store a version history. I have used the git command line interface before on a personal computer. However, I want to be able to use git on my school laptop (the computer I have the most access to). Since I do not have the admin privileges to just set up the standard git command line, I went over to here to download the portable version (32-bit).
I extracted the download to the root directory of my flashdrive (D:). I ran git-bash.exe and soon realized I didn't have access to the rest of the flashdrive outside of the portablegit folder. The directory of Portable Git was D:/portablegit and the directory of the program I wanted to create the git repository was D:/C/Minecraft/Minecraft. One obvious solution was just to put my project inside the portablegit folder but I think there is a more convenient way by modifying the %path% variable (I'm still not entirely sure what that means).
I read through readme provided in portablegit/readme.portable and found this:
I opened up git-bash-exe and typed in:
Code:
which didn't return anything.
Then I typed in the second line and got this:
Code:
If I understood the readme correctly, I can set the HOME directory outside of the portablegit folder (e.g. D:/), which will allow me to navigate to my C project and setup a git repository inside of it. However, directly typing
Code:
into git-bash.exe resulted in an error.
So my question is, is there a way to setup a git repository in my C project folder without physically moving inside of portablegit? And am I on the right track by trying to set up the HOME environment variable following the readme provided? And if so, what am I doing wrong?
Thanks in advance.
Edit:
Inside of git-bash.exe, I tried just navigating out of the portablegit directory by using cd .., but it still remained in the same directory.
I extracted the download to the root directory of my flashdrive (D:). I ran git-bash.exe and soon realized I didn't have access to the rest of the flashdrive outside of the portablegit folder. The directory of Portable Git was D:/portablegit and the directory of the program I wanted to create the git repository was D:/C/Minecraft/Minecraft. One obvious solution was just to put my project inside the portablegit folder but I think there is a more convenient way by modifying the %path% variable (I'm still not entirely sure what that means).
I read through readme provided in portablegit/readme.portable and found this:
I opened up git-bash-exe and typed in:
Code:
set HOME=%cd%/home
which didn't return anything.
Then I typed in the second line and got this:
Code:
$ git --cd-to-home
unknown option: --cd-to-home
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
If I understood the readme correctly, I can set the HOME directory outside of the portablegit folder (e.g. D:/), which will allow me to navigate to my C project and setup a git repository inside of it. However, directly typing
Code:
set HOME=%cd%/home
git --cd-to-home
into git-bash.exe resulted in an error.
So my question is, is there a way to setup a git repository in my C project folder without physically moving inside of portablegit? And am I on the right track by trying to set up the HOME environment variable following the readme provided? And if so, what am I doing wrong?
Thanks in advance.
Edit:
Inside of git-bash.exe, I tried just navigating out of the portablegit directory by using cd .., but it still remained in the same directory.