Step 1: Go to Github repository and in code section copy the URL. Step 2: In the Command prompt, add the URL for your repository where your local repository will be pushed. Step 3: Push the changes in your local repository to GitHub. Here the files have been pushed to the master branch of your repository.
If you want to launch from a batch file:
for x86
start "" "%SYSTEMDRIVE%\Program Files (x86)\Git\bin\sh.exe" --login
for x64
start "" "%PROGRAMFILES%\Git\bin\sh.exe" --login
I'm not sure exactly what you mean by "full Git Bash environment", but I get the nice prompt if I do
"C:\Program Files\Git\bin\sh.exe" --login
In PowerShell
& 'C:\Program Files\Git\bin\sh.exe' --login
The --login
switch makes the shell execute the login shell startup files.
I prefer to use git-bash.exe instead of sh.exe.
start "" "%ProgramFiles%\Git\git-bash.exe" -c "tail -f /c/Windows/win.ini"
You can stop closing the window when call /usr/bin/bash --login -i
in the end;
start "" "%ProgramFiles%\Git\git-bash.exe" -c "echo 1 && echo 2 && /usr/bin/bash --login -i"
Note: I'm not sure this is a good way :)
I prefer, putting git in environment variable and just calling
c:\Users\[myname]>sh
or
c:\Users\[myname]>bash
Steps to create Environment variable (Win7)
In the section User variables, hit button NEW, put variable name as GIT_HOME
, value as (folder-where-you-installed-git).
c:\tools\git
, others maybe have C:\Program Files\Git
find the PATH
environment variable and select it. Click Edit. (If the PATH environment variable does not exist, click New).
%GIT_HOME%
and %GIT_HOME%\bin
. Click OK. Close all remaining windows by clicking OK.sh
or bash
or git-bash
start "" "%SYSTEMDRIVE%\Program Files (x86)\Git\bin\sh.exe" --login -i
Git bash will get open.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With